Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp887865imj; Fri, 15 Feb 2019 08:25:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ3mObamm1cR5F+Fgpg2d9/tnVXaIEK83YTxn1XaxzkxovLgRxKT8re7LHi5RFINSlYtotz X-Received: by 2002:a17:902:1486:: with SMTP id k6mr11323294pla.49.1550247908091; Fri, 15 Feb 2019 08:25:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550247908; cv=none; d=google.com; s=arc-20160816; b=M9rYgRfjYmrnmXBPsnmTrP5LJMhjHBR7QH8XFqDBzlvYKrLWq4CferXtaETmHjp1sX pvgY+7rR9mvoFT+I8zR/5g+i736Iv74Sxvk/KwxWZWAZ7uuiU56hEDh8AoX9sRrzo3ps P4/NJtHv/3WkStyOoW3NoHJgHUcmMkN6WFu0QGmRXr0vbEy8vIFcgngsLHDepheNCmzA Yxs/y1nVf3XG/ybSq5dLW5XnPod/+5LTXmy4OYkrG/sofbsV/dSTBjLcG+/XVOv3jKBP bvbmVcd3UXzxCE+GAioaHjppYdIITsn9vFUFZSlfXoRaMQ4XvYjC+ghHSNr4JBR9+U2T mzLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature; bh=jzyhPl3YglK7yUBctudQfISg3mpsITA6KIy8ISSumso=; b=UnOJMoaw7JXC9uhJ9f3SJbw6xv5OIMMDo2YiatSI8flIsJ28hM7qZHR81OpP9C6SF5 OqIi/ZgR2uTcjFojKS1yWTB+vF8D8SoBD4v0+L6qVPtBXK/pwUPPg+LSW2UgH032sPum z2r+RpfqDQWZgLlZNjoTWxzlHG6i6/uoxm4QSzcRYnJ4ArfQjNjQPLJDrfNYl4dvG39f yySVQDdhOKVADULjmHmR+e5CpjbakgYAl78V7lQkDmMOl6iT/Yn45w+y4USCGo0Lpjvb 52UMcsW8ypAEtEH4VMcpgJiYEKFe9RITio5G0jhww2WQqGSHkz7sPC8NHE+ggtoHrnwR z5Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ysoft.com header.s=20160406-ysoft-com header.b=WAyqiKJu; 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=ysoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si854645pfj.111.2019.02.15.08.24.43; Fri, 15 Feb 2019 08:25:08 -0800 (PST) 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 (test mode) header.i=@ysoft.com header.s=20160406-ysoft-com header.b=WAyqiKJu; 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=ysoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731007AbfBOPBM (ORCPT + 99 others); Fri, 15 Feb 2019 10:01:12 -0500 Received: from uho.ysoft.cz ([81.19.3.130]:48208 "EHLO uho.ysoft.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730831AbfBOPBM (ORCPT ); Fri, 15 Feb 2019 10:01:12 -0500 Received: from [10.1.8.111] (unknown [10.1.8.111]) by uho.ysoft.cz (Postfix) with ESMTP id C8C75A6490; Fri, 15 Feb 2019 16:01:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ysoft.com; s=20160406-ysoft-com; t=1550242868; bh=jzyhPl3YglK7yUBctudQfISg3mpsITA6KIy8ISSumso=; h=To:Cc:From:Subject:Date:From; b=WAyqiKJur8zVuzpV52wuQalOnvM5b+5rSMLK46UKw+YfwWhfo8Y12GEXOjb0C1yqL N2LncuddOHzcHaVlC5yhEdGWsqtPg6Fr4UgMP2FB7TRBSm3BdmxWWoUGGXBdICr9kJ NA7W8jspr69Wu8CBn0+nHivQixp3jrcg7FFxYtiw= To: Vinod Koul , Andrew Lunn Cc: "David S. Miller" , netdev@vger.kernel.org, "linux-kernel@vger.kernel.org" , Florian Fainelli From: =?UTF-8?B?TWljaGFsIFZva8OhxI0=?= Subject: [RFC] net: dsa: qca8k: implement rgmii-id mode Message-ID: <0c7428dc-736e-c5c4-13e7-b42052c60cd7@ysoft.com> Date: Fri, 15 Feb 2019 16:01:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, networking on my boards [1], which are currently in linux-next, suddently stopped working. I tracked it down to this commit 5ecdd77c61c8 ("net: dsa: qca8k: disable delay for RGMII mode") [2]. So I think the rgmii-id mode is obviously needed in my case. I was able to find a couple drivers that read tx/rx-delay or tx/rx-internal-delay from device tree. Namely: drivers/net/ethernet/apm/xgene/xgene_enet_main.c drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c drivers/net/phy/dp83867.c I would appreciate any hints how to add similar function to qca8k driver if that is the correct way to go. Can I take some of the above mentioned drivers as a good example for that? How should the binding look like? I would expect something like this: switch@0 { compatible = "qca,qca8334"; reg = <0>; switch_ports: ports { #address-cells = <1>; #size-cells = <0>; ethphy0: port@0 { reg = <0>; label = "cpu"; phy-mode = "rgmii-id"; qca,tx-delay = <3>; qca,rx-delay = <3>; ethernet = <&fec>; }; }; Thanks in advance, Michal [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=87489ec3a77f3e01bcf0d46e353ae7112ec8c4f0 [2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/dsa/qca8k.c?id=5ecdd77c61c8fe1d75ded538701e5e854963c890