From patchwork Sat Mar 11 01:07:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 9618291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4525860415 for ; Sat, 11 Mar 2017 01:08:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27514287AB for ; Sat, 11 Mar 2017 01:08:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09B1E287B2; Sat, 11 Mar 2017 01:08: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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 269BB287AB for ; Sat, 11 Mar 2017 01:08:37 +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:To:Subject:Message-ID:Date:From: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wMVJPFAsUhu28+ijG5O/ULyOjpqgnCwOyHX89mQCOzE=; b=sCxqDqkWcZMAKr HkUZhhnB2Qt7U0c6frUf5aEFHdNW3TfC69rxBxQrPrb2HchkfODn6AxfjtTm9usnTxCOxHIj1WzMN 5yZCqY/smyCuBehI6PH+RvLTFPw/nSsCm5OhIZLD1c2/owGOvhUKFBmbA7fHig7RQkLM8yagPTkJ2 2VuwiqQqYRDPtber6XVl/oUy9Nfm2foqLf4WYWnXhDkHNDZlHMJ7+bp4mMfZndghcVnbvfXCZW0x5 F4tXelPPMs0Hvh/h9yhyYbdpTQOs1A3huJjF3AUaHL2Cpv78NmhJ6U8N6l1oaGKlTNIDpHIYjhxJc Iqtksa1vQB8fmSCBVEHg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cmVWB-0002Lg-1q; Sat, 11 Mar 2017 01:08:24 +0000 Received: from mail-io0-x232.google.com ([2607:f8b0:4001:c06::232]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cmVVk-0002K7-PO for linux-arm-kernel@lists.infradead.org; Sat, 11 Mar 2017 01:07:59 +0000 Received: by mail-io0-x232.google.com with SMTP id z13so58881111iof.2 for ; Fri, 10 Mar 2017 17:07:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+yLKzLbKYtIPeEeCST2UwymnmmC0kS3eVk295m7hD3w=; b=FdQW4tH9RK6tI4ldDxAgrFWeKUaSNLpQg2ekmlMqIaLj6i/vylnbJyqKupMCsrC4K+ Sh4tt7w8T1aUodtWOVDNxmQyHrtqMhq1n34CkB4u+XXoi+z75z+xKczGiFGcOYGLXcVM PkECmO9RstWco3nR2Z91ArWbwCgq8715oGjqWW+yT2QSoypMjrNqJBmSRv+dfgb7qEX1 wx/FEkOffl0we35wsIi+8qJo1x50PUmM5kkIjZAOEKNceo3FIQk7f1peuc7Sx3AHve06 gS0dIiSKdlg8U9+u0NGxwWjYXr4tbs8KfjKs1Bqzl3vDzz+n+mUR4dQZJr/3b4qusGR4 AyuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+yLKzLbKYtIPeEeCST2UwymnmmC0kS3eVk295m7hD3w=; b=VtFsT5cTuG0L9iGFjPyBwztZdkKToEBPukVB1h0UuYb5v4VDia6ADcEyOKv34MVpTu ElMp311bSyY91MWTMwmdQ7XDu/GFZ8DY4+RJ6fBPITEzXchIusy/l8M9OiZe4P6gJdIh MEAO5V45gSjtTruqzjDLyuXUJGCqGOGlrvPziAC77ctGnpC0Si1vHoZ/UgR6VqbgrTNQ ruEl6PQTnYyM6gmBH5SOHPm9gMe6AyHZS2pXdxsYUJSODU1U2mBwBPe56q9oHfuiRPCS T7zOChNYLQWd8MTYPkM5v/Ro40sFuFTwn+by4rIq2gy8SSDykb1g5Vx5+7qNPwX+l9rQ 2SZw== X-Gm-Message-State: AMke39lNNHO3KrjZe8nIA8GHXowAhrYvgjW7K9nvZvQjU5IMVoztEfUue/JIPLyrpRjfjjtF3SIMCElO8qPzMw== X-Received: by 10.107.139.210 with SMTP id n201mr17732627iod.178.1489194454345; Fri, 10 Mar 2017 17:07:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.151.69 with HTTP; Fri, 10 Mar 2017 17:07:33 -0800 (PST) In-Reply-To: <04584d61-f1e2-3722-1f13-ff133edc0c22@gmail.com> References: <1489178411-6559-1-git-send-email-tharvey@gateworks.com> <04584d61-f1e2-3722-1f13-ff133edc0c22@gmail.com> From: Tim Harvey Date: Fri, 10 Mar 2017 17:07:33 -0800 Message-ID: Subject: Re: [PATCH] ARM: dts: imx: add Gateworks Ventana GW5904 support To: Florian Fainelli X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170310_170756_922482_DC0EFB45 X-CRM114-Status: GOOD ( 18.82 ) 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: "devicetree@vger.kernel.org" , Shawn Guo , "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 On Fri, Mar 10, 2017 at 12:43 PM, Florian Fainelli wrote: > >> + dsa { >> + compatible = "marvell,dsa"; >> + #address-cells = <2>; >> + #size-cells = <0>; >> + >> + dsa,ethernet = <&fec>; >> + dsa,mii-bus = <&mdio>; >> + > > Please consider using the new binding for DSA switches, see: > > https://patchwork.kernel.org/patch/9493037/ > Hi Florian, I tried the new binding first, but haven't gotten it to work yet. Let me make sure I understand what I should be doing. This is a MV88E6176 so I first need to add dt support for that to the mv88e6xxx driver (which supports the device, just not via dt): Then I remove the old binding and add the new binding as such: &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii-id"; status = "okay"; mdio { #address-cells = <1>; #size-cells = <0>; switch0@0 { compatible = "marvell,mv88e6176"; #address-cells = <1>; #size-cells = <0>; reg = <0>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; label = "lan0"; }; port@1 { reg = <1>; label = "lan1"; }; port@2 { reg = <2>; label = "lan2"; }; port@3 { reg = <3>; label = "lan3"; }; port@5 { reg = <5>; label = "cpu"; ethernet = <&fec>; fixed-link { speed = <1000>; full-duplex; }; }; }; }; }; }; This does give me eth0, lan1, lan2, lan3, lan4 netdevs but when I bring up eth0 I crash: root@ventana:~# ifconfig eth0 up [ 45.826516] ------------[ cut here ]------------ [ 45.831169] Kernel BUG at c01923cc [verbose debug info unavailable] [ 45.837461] Internal error: Oops - BUG: 0 [#1] SMP ARM [ 45.842617] Modules linked in: [ 45.845692] CPU: 0 PID: 486 Comm: ifconfig Tainted: G W 4.11.0-rc1-00020-g0885e48-dirty #537 [ 45.855265] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 45.861805] task: ee2e55c0 task.stack: eddd2000 [ 45.866348] PC is at mod_timer+0x1e4/0x22c [ 45.870456] LR is at add_timer+0x20/0x28 [ 45.874391] pc : [] lr : [] psr: 600e0093 [ 45.874391] sp : eddd3c20 ip : eddd3c60 fp : eddd3c5c [ 45.885878] r10: 00000200 r9 : ee828818 r8 : 00000064 [ 45.891112] r7 : ee802e00 r6 : ffff9d19 r5 : ee802e00 r4 : ee21b350 [ 45.897649] r3 : 00000000 r2 : 00000000 r1 : ffff9d19 r0 : ee21b350 [ 45.904187] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none [ 45.911417] Control: 10c5387d Table: 3dea804a DAC: 00000051 [ 45.917173] Process ifconfig (pid: 486, stack limit = 0xeddd2210) [ 45.923275] Stack: (0xeddd3c20 to 0xeddd4000) [ 45.927647] 3c20: c01257f8 c01256e8 000005e9 c01402fc 00000004 00000004 ee802e00 ee21b350 [ 45.935838] 3c40: ee802e00 00000064 ee828818 00000200 eddd3c6c eddd3c60 c0192434 c01921f4 [ 45.944029] 3c60: eddd3c94 eddd3c70 c014026c c0192420 00000064 ee21b330 eddd3c94 600e0013 [ 45.952220] 3c80: ee21b330 00000004 eddd3cbc eddd3c98 c01403d8 c01401f0 ee21b000 00000000 [ 45.960410] 3ca0: c05f9e7c c05f9e7c 00000008 ee828818 eddd3ccc eddd3cc0 c05e71a0 c0140368 [ 45.968600] 3cc0: eddd3cec eddd3cd0 c05e945c c05e7188 eddd3d60 ee21b000 ee837000 c05f9e7c [ 45.976791] 3ce0: eddd3d14 eddd3cf0 c05e94c0 c05e9430 00000000 ee837000 eddd3d23 00000000 [ 45.984981] 3d00: c1649b9c ee828818 eddd3dbc eddd3d18 c05f9e14 c05e9484 00000000 c05f7d48 [ 45.993171] 3d20: 32000000 30383831 652e3030 72656874 2d74656e 00000031 000003e8 000000c8 [ 46.001361] 3d40: c0172424 c0171cf4 000003e8 000000c8 014000c0 00000000 c1649b9c ee828814 [ 46.009551] 3d60: 38383132 2e303030 65687465 74656e72 303a312d ee800030 eddd3dbc eddd3d88 [ 46.017742] 3d80: c021e458 c09a2f30 eddd3dbc c05fcde0 c05f8cc0 f11ba000 ee837000 ee828000 [ 46.025931] 3da0: 00000000 f11ba000 ee837000 ee828000 eddd3df4 eddd3dc0 c05fce40 c05f9d18 [ 46.034122] 3dc0: 00000001 ee83766c eddd3df4 ee837000 00000000 c0a6a9d4 ee837030 00000000 [ 46.042311] 3de0: bebeaeaa 00000000 eddd3e1c eddd3df8 c078dde0 c05fcbd0 eddd3e1c ee837000 [ 46.050502] 3e00: ee837000 00000001 00001043 00001002 eddd3e44 eddd3e20 c078e098 c078dd3c [ 46.058692] 3e20: ee837000 ee83713c 00001002 ee20d80c 00000000 bebeaeaa eddd3e6c eddd3e48 [ 46.066881] 3e40: c078e17c c078e014 00000000 eddd3e90 00000000 ee20d80c bebeaaac bebeaeaa [ 46.075071] 3e60: eddd3edc eddd3e70 c080895c c078e168 c0e6b180 bebeaaac 00000020 ee20d80c [ 46.083261] 3e80: ee20d800 00000014 ee837000 00008914 30687465 00000000 00000000 00000000 [ 46.091451] 3ea0: b6f81043 bebeaeaa 0000002c 0001b3b8 b6f81002 00008914 ed872920 bebeaaac [ 46.099642] 3ec0: ed872900 00000004 eddd2000 00000000 eddd3eec eddd3ee0 c080b334 c0808230 [ 46.107832] 3ee0: eddd3f0c eddd3ef0 c076bab4 c080b1a4 bebeaaac ed872920 edf05140 c023af64 [ 46.116022] 3f00: eddd3f7c eddd3f10 c023a5a4 c076b968 ffffff9c eddb6000 fffffffe c0107f44 [ 46.124213] 3f20: eddd2000 00000000 eddd3f4c eddd3f38 c0236b2c c021cb88 fffffffe ffffff9c [ 46.132402] 3f40: eddd3f94 eddd3f50 c02242b8 c0236ad4 c0227ef8 edf05140 00000004 edf05140 [ 46.140593] 3f60: 00008914 bebeaaac eddd2000 00000000 eddd3fa4 eddd3f80 c023af64 c023a514 [ 46.148782] 3f80: 0001b8f0 0001b6c8 bebeab74 00000036 c0107f44 eddd2000 00000000 eddd3fa8 [ 46.156972] 3fa0: c0107da0 c023af34 0001b8f0 0001b6c8 00000004 00008914 bebeaaac 00001002 [ 46.165162] 3fc0: 0001b8f0 0001b6c8 bebeab74 00000036 00000000 00000000 0001b8f8 00000000 [ 46.173352] 3fe0: 0001b07c bebeaa9c 0000accf b6f17c66 000e0030 00000004 00000000 00000000 [ 46.181534] Backtrace: [ 46.184000] [] (mod_timer) from [] (add_timer+0x20/0x28) [ 46.191062] r10:00000200 r9:ee828818 r8:00000064 r7:ee802e00 r6:ee21b350 r5:ee802e00 [ 46.198899] r4:00000004 [ 46.201453] [] (add_timer) from [] (__queue_delayed_work+0x88/0x178) [ 46.209560] [] (__queue_delayed_work) from [] (queue_delayed_work_on+0x7c/0x84) [ 46.218615] r6:00000004 r5:ee21b330 r4:600e0013 [ 46.223254] [] (queue_delayed_work_on) from [] (phy_start_machine+0x24/0x2c) [ 46.232051] r9:ee828818 r8:00000008 r7:c05f9e7c r6:c05f9e7c r5:00000000 r4:ee21b000 [ 46.239811] [] (phy_start_machine) from [] (phy_connect_direct+0x38/0x54) [ 46.248351] [] (phy_connect_direct) from [] (phy_connect+0x48/0x80) [ 46.256367] r7:c05f9e7c r6:ee837000 r5:ee21b000 r4:eddd3d60 [ 46.262043] [] (phy_connect) from [] (fec_enet_mii_probe+0x108/0x170) [ 46.270234] r9:ee828818 r8:c1649b9c r7:00000000 r6:eddd3d23 r5:ee837000 r4:00000000 [ 46.277991] [] (fec_enet_mii_probe) from [] (fec_enet_open+0x27c/0x344) [ 46.286351] r6:ee828000 r5:ee837000 r4:f11ba000 [ 46.290985] [] (fec_enet_open) from [] (__dev_open+0xb0/0x118) [ 46.298567] r10:00000000 r9:bebeaeaa r8:00000000 r7:ee837030 r6:c0a6a9d4 r5:00000000 [ 46.306404] r4:ee837000 [ 46.308950] [] (__dev_open) from [] (__dev_change_flags+0x90/0x154) [ 46.316963] r7:00001002 r6:00001043 r5:00000001 r4:ee837000 [ 46.322635] [] (__dev_change_flags) from [] (dev_change_flags+0x20/0x50) [ 46.331085] r9:bebeaeaa r8:00000000 r7:ee20d80c r6:00001002 r5:ee83713c r4:ee837000 [ 46.338844] [] (dev_change_flags) from [] (devinet_ioctl+0x738/0x838) [ 46.347033] r9:bebeaeaa r8:bebeaaac r7:ee20d80c r6:00000000 r5:eddd3e90 r4:00000000 [ 46.354790] [] (devinet_ioctl) from [] (inet_ioctl+0x19c/0x1c8) [ 46.362459] r10:00000000 r9:eddd2000 r8:00000004 r7:ed872900 r6:bebeaaac r5:ed872920 [ 46.370296] r4:00008914 [ 46.372848] [] (inet_ioctl) from [] (sock_ioctl+0x158/0x32c) [ 46.380262] [] (sock_ioctl) from [] (do_vfs_ioctl+0x9c/0xa20) [ 46.387756] r7:c023af64 r6:edf05140 r5:ed872920 r4:bebeaaac [ 46.393429] [] (do_vfs_ioctl) from [] (SyS_ioctl+0x3c/0x64) [ 46.400751] r10:00000000 r9:eddd2000 r8:bebeaaac r7:00008914 r6:edf05140 r5:00000004 [ 46.408589] r4:edf05140 [ 46.411141] [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x1c) [ 46.418724] r9:eddd2000 r8:c0107f44 r7:00000036 r6:bebeab74 r5:0001b6c8 r4:0001b8f0 [ 46.426479] Code: eaffffbd e1a0500a e1a0a005 eaffffcc (e7f001f2) [ 46.432587] ---[ end trace c923534ad86e0767 ]--- Segmentation fault root@ventana:~# [ 67.156856] systemd-journald[202]: Successfully sent stream file descriptor to service manager. Is there something wrong with my dt node that you see or perhaps something else going on here required by the new binding? Thanks, Tim >> + switch@0 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + reg = <0 0>; /* MDIO address 0, switch 0 in tree */ >> + >> + port@0 { >> + reg = <0>; >> + label = "lan4"; >> + }; >> + >> + port@1 { >> + reg = <1>; >> + label = "lan3"; >> + }; >> + >> + port@2 { >> + reg = <2>; >> + label = "lan2"; >> + }; >> + >> + port@3 { >> + reg = <3>; >> + label = "lan1"; >> + }; >> + >> + port@5 { >> + reg = <5>; >> + label = "cpu"; >> + fixed-link { >> + speed = <1000>; >> + full-duplex; >> + }; >> + }; >> + }; >> + }; >> +}; > -- > Florian diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 03dc886..fd5c716 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -4602,6 +4602,10 @@ static const struct of_device_id mv88e6xxx_of_match[] = { .data = &mv88e6xxx_table[MV88E6085], }, { + .compatible = "marvell,mv88e6176", + .data = &mv88e6xxx_table[MV88E6176], + }, + { .compatible = "marvell,mv88e6190", .data = &mv88e6xxx_table[MV88E6190], },