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: 458925 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 E7A38C48BE0 for ; Fri, 11 Jun 2021 20:06:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D03DF60E0C for ; Fri, 11 Jun 2021 20:06:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231171AbhFKUIX (ORCPT ); Fri, 11 Jun 2021 16:08:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbhFKUIU (ORCPT ); Fri, 11 Jun 2021 16:08:20 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E576C061280 for ; Fri, 11 Jun 2021 13:06:05 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id r11so38399770edt.13 for ; Fri, 11 Jun 2021 13:06: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=YvxufdEAIn30Wjc3pVqAlBYSMRyP13Y5FFAPpdQHH+czXdBtInPREdG7+FXcE3ydvZ 9jou9Ja16idW4Y2TDULbNshIAacqGgz5gdFg4/1eNG6OD7011Sobir0VtPkGL2DFKE6+ yxYZGnqiz1t1wb0koeEOiMaQhhLbZD/XNQfRIdUpRTkq1EOA/MqtYMM2USrOeAP1z2SJ xcj0G4ux4hqvtkdgT7ALp5dqQWKy3XgF9Xu9TsCJ1daFuhNnPwJ+DhGHcfV3YOg7z4CE VUNb0/ACBA1o/9taIE+e8fb1gMUfHgwVkP+LRa7CuMMh0et9jfGpi1zYcJ6uVFU8NQ/o npyQ== X-Gm-Message-State: AOAM533Zh+zFUIfCvhp/hq2O65kfP3CVMz1UHHlXfJs1Bu8Q9CgT7KRf JqWQ8Vf5NOGDm/KrXtDfZ1s= 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 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.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: