From patchwork Fri Jun 11 20:05:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12316569 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 48E5DC48BD1 for ; Fri, 11 Jun 2021 20:53:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C80961278 for ; Fri, 11 Jun 2021 20:53:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C80961278 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IoQH94tOAZFA8NVq3oj3PFwqMeFboOQYVB4JJ5lCFvY=; b=4HEzhIuj2Qoyev 1YWIr26XAMD2LZah7OuXW880066Q+lFyiSpUYRq4k8+vybfPwg6Nw17eoAzpXGKU9WK7fsyE21mcd mjliCHwbB7iAYktv9Wy5z63IveeXgaK6k7VxFvGi2yO7KDRj0Cn+x9lgM5HsWNlAlvj+pH216PQ2c dbJ6N4B4b0n3RSLBNXlYjKng+iCrpSNF2sYvGdrWlpIt1dQ0yTGAWo8owRwnWnQlKpyVGly0d25k3 YwrRCP7tGsx99ZcQBSyfR5Rk4sLlBCRdoUfQRviNEizCN5hd1yxjUnDBZaOa1d4nTz1iohuZmZgBv z2P3rV1ns5GER++AiDBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lro72-00717p-G9; Fri, 11 Jun 2021 20:50:46 +0000 Received: from mail-ed1-f41.google.com ([209.85.208.41]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrnQo-006p2k-3q for linux-arm-kernel@lists.infradead.org; Fri, 11 Jun 2021 20:07:07 +0000 Received: by mail-ed1-f41.google.com with SMTP id t3so38460968edc.7 for ; Fri, 11 Jun 2021 13:07:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xRBvZz0lIfl1yQ7DunT3dpjQHDR3uZQtR8Zy7dtHBEI=; b=eutQrOM2z0zWi66eSb6VewhWJzCQMoabVUTQDr0cbi7Lg+ZLj0b9rpQf8TQ7U2eSlM y344OyYmjm9YX4FOs5C25fpYaZDawAvh7T/SuuyxMvQRyrT4shKSJx0z7rxImSks1YVb KCEOckI5UWqoVskjGOWWoxnAZMDglUJ1vQRNPlFiBL9de2sPTorxhNWIYJBHlPxI/Tol CUlMHkkNgzz8Op5G8o/zur6gYpGvtivmVYTfyiN39X2LSf24Z0x34XODwmYOvDSsPKOM rQCcKKw3bQ4m1B+GQe7ALKqUN3kDqj4FxD1ecGXMfTHUz7zLvJosKdhEUKCdtglPeJyY 54Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xRBvZz0lIfl1yQ7DunT3dpjQHDR3uZQtR8Zy7dtHBEI=; b=GURxNOAIC7R2pXgORQ1movVreBGFYdHHfoncnENN9RrA5fjAAS65jkREGzv8IPODTq inDAiC50ltsFigqydMUIiOYzqWiBqPdzTTywwQr6oy8r3KIOjNhmVjgqZx8J2rc03IFy XnsWboAKnPN6hBWcbWv/PWJ7joiKNSA1RrtvmGbOFIJ9zgp1VQfAGy9wqjlLXDPIj1fE pWcXHlH+vEUAJQcHl6bGCWzMs8xz7XeAbM8gLp1aqDoH5cuCqLvEMEyePJ1q6GD4BAut B8JJRL8am94VemUlx4rtm+MQssOzkvVrz52hTuE3WxiQDk647h/PCYql7AL9rJqAehTB glGQ== X-Gm-Message-State: AOAM532UohIsoTalvbYgd6wR6Br2rti7NWTm97zNUVJwDS4lFw0CBAzb TtK6HQNa8lgqsTQgr+Jlgks= X-Google-Smtp-Source: ABdhPJyuT9MfxU8KMdbPgDFY+Fo6IcLiSiWe7mongMX3p0Ssy9uL34ykPCRqQZXcSxq8RJrImQHQuA== X-Received: by 2002:aa7:c758:: with SMTP id c24mr5635417eds.188.1623441964199; Fri, 11 Jun 2021 13:06:04 -0700 (PDT) Received: from localhost.localdomain ([188.26.52.84]) by smtp.gmail.com with ESMTPSA id w2sm2392084ejn.118.2021.06.11.13.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 13:06:03 -0700 (PDT) From: Vladimir Oltean To: Jakub Kicinski , "David S. Miller" , netdev@vger.kernel.org Cc: Wong Vee Khee , Ong Boon Leong , Michael Sit Wei Hong , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Jose Abreu , Maxime Coquelin , Heiner Kallweit , Russell King - ARM Linux admin , Florian Fainelli , Andrew Lunn , Vivien Didelot , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Vladimir Oltean Subject: [PATCH v3 net-next 12/13] net: dsa: sja1105: SGMII and 2500base-x on the SJA1110 are 'special' Date: Fri, 11 Jun 2021 23:05:30 +0300 Message-Id: <20210611200531.2384819-13-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611200531.2384819-1-olteanv@gmail.com> References: <20210611200531.2384819-1-olteanv@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210611_130706_203770_8FBCA060 X-CRM114-Status: GOOD ( 11.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Vladimir Oltean For the xMII Mode Parameters Table to be properly configured for SGMII mode on SJA1110, we need to set the "special" bit, since SGMII is officially bitwise coded as 0b0011 in SJA1105 (decimal 3, equal to XMII_MODE_SGMII), and as 0b1011 in SJA1110 (decimal 11). Signed-off-by: Vladimir Oltean --- v2->v3: none v1->v2: none drivers/net/dsa/sja1105/sja1105_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c index bd1f2686e37d..3e32b8676fa7 100644 --- a/drivers/net/dsa/sja1105/sja1105_main.c +++ b/drivers/net/dsa/sja1105/sja1105_main.c @@ -209,12 +209,14 @@ static int sja1105_init_mii_settings(struct sja1105_private *priv) goto unsupported; mii->xmii_mode[i] = XMII_MODE_SGMII; + mii->special[i] = true; break; case PHY_INTERFACE_MODE_2500BASEX: if (!priv->info->supports_2500basex[i]) goto unsupported; mii->xmii_mode[i] = XMII_MODE_SGMII; + mii->special[i] = true; break; unsupported: default: