From patchwork Thu Nov 15 12:12:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Bansal X-Patchwork-Id: 10684227 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 07BBE14E2 for ; Thu, 15 Nov 2018 12:12:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E504B2C596 for ; Thu, 15 Nov 2018 12:12:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8AC22C58E; Thu, 15 Nov 2018 12:12:38 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 245EB2C59A for ; Thu, 15 Nov 2018 12:12:38 +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: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:In-Reply-To:References: List-Owner; bh=SHbBEBz8Ts02mQ11Y8Y1E7VXyUDCaoLv9FepKdaj1g8=; b=XbpSMtRA157xT6 v87AsfxQdqPLE6SprHkTw9p2Q3vnoLPleVSHzmGp2RHRKtZOa/7LODOReTp2yge1AxgqO6aSfaouL 86WD5PUg6DSKJqQ4R8eTbw4PvRDIppBWLxuHWwsEqT/jg+dewUKsPi5KFjt9PrWO1QcC+sNzFOuVH nIN7GPfvAjqMFmOI0TZd2EnWvHsU399su+hKLl0EMSeEQ919JKoacZk0h9VbOM5BSbA+vX0DFGGO0 vCX/N6ejvzM3uDPi8eXOlCB0cABatAFq1mfZgPYBXkEjHqHrWNqJmSYZpkiIKSSZ8ZXw5fUwkCCTl Bv9CnjPyXbD8EyWaTnzQ==; 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 1gNGVW-0003Cz-6A; Thu, 15 Nov 2018 12:12:26 +0000 Received: from mail-db5eur03on0631.outbound.protection.outlook.com ([2a01:111:f400:fe0a::631] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNGVS-0003C4-9x for linux-arm-kernel@lists.infradead.org; Thu, 15 Nov 2018 12:12:24 +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=aqgZC6KRTPcaJ4UoYIiTellE2A7bH6o4rzrQvlOJfO4=; b=Ge/iHmbZvAimTf2VR54JjsG6XUBK21oNix/yH5k3zhycX9vhP9FsncVHtXUBJ4pC6pEUY0m/w4pjqq/G9wDuR0cQVVrZHSGh/gcojZUcSLk26JTqAlL5+IZqc4UhMjln9cTHTiSFF92kHvKuC+/7m74wY6bSLo90JOw8P2m1+3Y= Received: from HE1PR0402MB3323.eurprd04.prod.outlook.com (10.167.125.20) by HE1PR0402MB2778.eurprd04.prod.outlook.com (10.175.29.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.21; Thu, 15 Nov 2018 12:12:05 +0000 Received: from HE1PR0402MB3323.eurprd04.prod.outlook.com ([fe80::a5e1:2a63:da33:1853]) by HE1PR0402MB3323.eurprd04.prod.outlook.com ([fe80::a5e1:2a63:da33:1853%2]) with mapi id 15.20.1294.034; Thu, 15 Nov 2018 12:12:05 +0000 From: Pankaj Bansal To: Shawn Guo , Leo Li , Andrew Lunn , Florian Fainelli Subject: [PATCH] arm64: dts: lx2160aqds: Add mdio mux nodes Thread-Topic: [PATCH] arm64: dts: lx2160aqds: Add mdio mux nodes Thread-Index: AQHUfNxsajYtnIAKbkGB1ox72RwWdg== Date: Thu, 15 Nov 2018 12:12:05 +0000 Message-ID: <20181115173752.22482-1-pankaj.bansal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR0101CA0003.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::13) To HE1PR0402MB3323.eurprd04.prod.outlook.com (2603:10a6:7:81::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [14.143.30.134] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0402MB2778; 6:A46GUe81gSTqGRT07uleeBeVHUcIkqrXybHRGzIvJnun0J4K+xdy+JRz/aitOMpzI8CQrWWT4ypDTfYuhZsWdBcX+t8ZhIYNuuFhCpPrd2wqQ25GoYsB7CRaWXbDXcrAfBg8ew+pb6fpVlh7wpDzpf/gKJnHTVHC5uW+IeaeXKxJJMa0DBFtHpHWWtdYTwSVgZX5mbYsLGMZFIyNNOIm1kDPE+oFgYF7btxEa9Nr6amBv+oKu6cDCv/qd4xQty8zIRUzNaQO12Id9i85I96BMxlA2RJy7N3YdQEBbvsaVy576jNcccBS1w5F6WAnv0dvyuYNmLeXg8VYDToaeNkpEPgSZo3wHPU0jSwi/Ii8WKluNN8fn2GF7i+Uq5tdeYe3RQjtxdVPeXwgebn3mFf2yLvV1b6KkGEfsSf/VAG1zYqZ1oXsvBvyN763KHOfhiQLw6HFAIO5P2xAiEYh30jpzA==; 5:fZV23YrJS9UGpLY8cV+EdR80rh9pePR5Xfj+99lTDw9wVvdVsFVip04ADxpHktceG2X9Mv27iQkMCTgdOny5gXWsugpI7povrf7KYNkixTcIUPm4P5abBEZjNmaKaiEQ6A56ZHi7p4ITfOBGYVNBJ9fpxzQoJzZyldk2jzg8am8=; 7:uWbsGk9nd+Vqz5LDzfQGWPLFHsUuztmXVWN2IzEKIME9n0hAT9r4rgdcoVpwihLSINy5zl2h4X5Au6S0Sn/941DaKD3n368TNvQRjdlswkScNqxaka9lKqgttHJ+0AAeln8es8yi7uu8ODEhmfYTLQ== x-ms-office365-filtering-correlation-id: 3a505205-de2a-49e1-b4ef-08d64af38e82 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:HE1PR0402MB2778; x-ms-traffictypediagnostic: HE1PR0402MB2778: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231415)(944501410)(52105112)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:HE1PR0402MB2778; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0402MB2778; x-forefront-prvs: 08572BD77F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(376002)(39860400002)(136003)(199004)(189003)(256004)(52116002)(78486014)(25786009)(6486002)(6436002)(7736002)(105586002)(86362001)(97736004)(305945005)(3846002)(6116002)(99286004)(6306002)(53936002)(106356001)(2900100001)(71190400001)(71200400001)(39060400002)(4326008)(6512007)(68736007)(110136005)(44832011)(8936002)(486006)(476003)(2616005)(81166006)(81156014)(54906003)(8676002)(5660300001)(316002)(478600001)(14454004)(66066001)(102836004)(186003)(1857600001)(1076002)(26005)(6506007)(386003)(55236004)(2906002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0402MB2778; H:HE1PR0402MB3323.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-microsoft-antispam-message-info: wF1MsGg9LJMZccUaVlvYBYF5MwFld0jhXTkcF4jugiKHNCqY6YSNm7pn0+sAWZnItGEq+ezYwKpnPj3/iFzcKN/SNXh4DSCoKZMle1el8ajOQLDUMYRJp4ph2JQ3792vSRE+rOLxj74CJP5vZEqMCb89QwyRJSb2+xozKKbkVXasGaJ6q9vZM7r0zYSEW4G/wP6Nw9uIKgJU4uqMjev4pO6lrKpzdBNyHxTZWyMHHoiLVchnMqEkuv7iSLSGt6wIwoXBvY7hmWZWR+pErS2cBeYF7sHiJxksRC/KaPOdRieZRqWcD/dfIx2cb6xDty/vTDiLec8llMNV70Ub/tA/jAHoPs6hSjfQVhbwjqIsthQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a505205-de2a-49e1-b4ef-08d64af38e82 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2018 12:12:05.5755 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0402MB2778 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181115_041222_392820_C5CD4753 X-CRM114-Status: GOOD ( 12.99 ) 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: "netdev@vger.kernel.org" , Pankaj Bansal , "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 The two external MDIO buses used to communicate with phy devices that are external to SOC are muxed in LX2160AQDS board. These buses can be routed to any one of the eight IO slots on LX2160AQDS board depending on value in fpga register 0x54. Additionally the external MDIO1 is used to communicate to the onboard RGMII phy devices. The mdio1 is controlled by bits 4-7 of fpga register and mdio2 is controlled by bits 0-3 of fpga register. Signed-off-by: Pankaj Bansal Signed-off-by: Pankaj Bansal --- Notes: This patch depends on following patches: [1]https://patchwork.kernel.org/cover/10658863/ [2]https://patchwork.codeaurora.org/patch/637861/ .../boot/dts/freescale/fsl-lx2160a-qds.dts | 116 +++++++++++++++++ .../boot/dts/freescale/fsl-lx2160a.dtsi | 23 ++++ 2 files changed, 139 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts index 8a0305a2b778..39aa2731ddfa 100644 --- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts @@ -54,6 +54,121 @@ &i2c0 { status = "okay"; + fpga@66 { + compatible = "fsl,lx2160aqds-fpga", "fsl,fpga-qixis-i2c"; + reg = <0x66>; + #address-cells = <1>; + #size-cells = <0>; + + mdio-mux-1@54 { + mdio-parent-bus = <&emdio1>; + reg = <0x54>; /* BRDCFG4 */ + mux-mask = <0xf8>; /* EMI1_MDIO */ + #address-cells=<1>; + #size-cells = <0>; + + mdio@0 { + reg = <0x00>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@40 { + reg = <0x40>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@c0 { + reg = <0xc0>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@c8 { + reg = <0xc8>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@d0 { + reg = <0xd0>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@d8 { + reg = <0xd8>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@e0 { + reg = <0xe0>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@e8 { + reg = <0xe8>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@f0 { + reg = <0xf0>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@f8 { + reg = <0xf8>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + + mdio-mux-2@54 { + mdio-parent-bus = <&emdio2>; + reg = <0x54>; /* BRDCFG4 */ + mux-mask = <0x07>; /* EMI2_MDIO */ + #address-cells=<1>; + #size-cells = <0>; + + mdio@0 { + reg = <0x00>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@1 { + reg = <0x01>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@2 { + reg = <0x02>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@3 { + reg = <0x03>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@4 { + reg = <0x04>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@5 { + reg = <0x05>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@6 { + reg = <0x06>; + #address-cells = <1>; + #size-cells = <0>; + }; + mdio@7 { + reg = <0x07>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + }; + i2c-mux@77 { compatible = "nxp,pca9547"; reg = <0x77>; @@ -118,3 +233,4 @@ &usb1 { status = "okay"; }; + diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi index 6ce0677c3096..518882b05f03 100644 --- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi @@ -780,5 +780,28 @@ ; dma-coherent; }; + /* TODO: WRIOP (CCSR?) */ + /* WRIOP0: 0x8B8_0000, E-MDIO1: 0x1_6000 */ + emdio1: mdio@0x8B96000 { + compatible = "fsl,fman-memac-mdio"; + reg = <0x0 0x8B96000 0x0 0x1000>; + device_type = "mdio"; /* TODO: is this necessary? */ + little-endian; /* force the driver in LE mode */ + + /* Not necessary on the QDS, but needed on the RDB*/ + #address-cells = <1>; + #size-cells = <0>; + }; + /* WRIOP0: 0x8B8_0000, E-MDIO2: 0x1_7000 */ + emdio2: mdio@0x8B97000 { + compatible = "fsl,fman-memac-mdio"; + reg = <0x0 0x8B97000 0x0 0x1000>; + device_type = "mdio"; /* TODO: is this necessary? */ + little-endian; /* force the driver in LE mode */ + + #address-cells = <1>; + #size-cells = <0>; + }; }; }; +