From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51570C26641 for ; Sun, 20 Jan 2019 17:30:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E20D22085A for ; Sun, 20 Jan 2019 17:30:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="MqW4yaal" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbfATRat (ORCPT ); Sun, 20 Jan 2019 12:30:49 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:49394 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726758AbfATRat (ORCPT ); Sun, 20 Jan 2019 12:30:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=LRvVECf0K6xpD4T33+JQUzGz576nXSST5MYmTmqHUA8=; b=MqW4yaalYuZj9LmFGbfrKrU7ckzaXMb/Ec0CRbU+AJvudjEIP8LQnTx+tN6WUYWfvbvl27j+rTHnlg2pWAFRXTgOofRFj5Fjj9TodXj8r/5q1fb8Jsg2nZura/wSRfKD0e6ytTRfAZn9wotrl1TjTgobAmRR5y4rNI5f2FSIAiw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1glGvn-0004ZH-H8; Sun, 20 Jan 2019 18:30:47 +0100 Date: Sun, 20 Jan 2019 18:30:47 +0100 From: Andrew Lunn To: Daniele Orlandi Cc: "netdev@vger.kernel.org" Subject: Re: DSA incompatible with TI CPSW device model in dual mac mode Message-ID: <20190120173047.GA15048@lunn.ch> References: <15e21356-0301-62c8-7d8f-0ea9680331f5@orlandi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15e21356-0301-62c8-7d8f-0ea9680331f5@orlandi.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Jan 19, 2019 at 12:09:39AM +0100, Daniele Orlandi wrote: > > Hello, > > I am trying to connect a Marvell switch (88E6172) to an AM3352 ethernet > port. > > In the DSA devicetree description the CPU port has to have an "ethernet" > attribute with a reference to a device node. From which it derives the > net_device with a call of of_find_net_device_by_node > > The CPSW driver, however, has a single device node with multiple (two) > net_devices associated. > > Thus, if I reference the "mac" (ethernet@4a100000) node the first (eth0) > port is matched. > > There is no way to actually reference eth1. Hi Daniele Looking at Documentation/devicetree/bindings/net/cpsw.txt, your DSA Ethernet phandle should point to cpsw_emac1: slave@1. I don't know if this actually works, but i _think_ some people have used DSA with this device. Andrew