From nobody Tue Jun 23 16:16:05 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64C35C433EF for ; Wed, 2 Mar 2022 11:05:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241223AbiCBLGX (ORCPT ); Wed, 2 Mar 2022 06:06:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241170AbiCBLGR (ORCPT ); Wed, 2 Mar 2022 06:06:17 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 386E14A3F4 for ; Wed, 2 Mar 2022 03:05:35 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id d17so1674894pfl.0 for ; Wed, 02 Mar 2022 03:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vNsqVoa00YCDeFZ4I2281SG6Ep4/CfQvbPK2hEihXH8=; b=FTqF9Zk8PEtqxa1Y6ShcNKAUf699DnxgjudKfbS4zE3S4KGBzID4J1wXuLTbV0ggHm RJaxOXHmjAn8bsatW/GUJYsM8T6YS0rbNdB80qaf5qg7ZZ5BKxu3HmcXnv2aSktp+1bE IffGJmdZpDmdbkgxEghfbsQRX0rbJuvWrTlpOfX4kIlSYYenkd3+rBelSC3a199VzeVQ 11fthqtauTIl5vUPOk0POZ+Rh+8ljiafPx/aoZe7Ccd4Ve7+czolkW2oMz2YXVZ7u15j khUjfaArSN6/hXH89Xt1jg8+nU9GVA0FUaJ14WSrbMCYIK07MSey+bTyS7p9n54DB8QS Nkyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vNsqVoa00YCDeFZ4I2281SG6Ep4/CfQvbPK2hEihXH8=; b=BbtTr7m/0q3ruMQOrWR9sWY3YyXwYp136VmRb/9zobq1K2n+q1jGEZaPAueEI77eIp 0s+Oe0ea93Vq78WWeB/hp0XIw2KX3t61seWVBAOedBNg8JZA1KhBMrtzEkLFj7kLJs4P 8yo+YesRCXW9mbQ7e3JRbzJJaZHfGoDOzlEnxMbWsEfUD53PYY14T7tYDgDuQl25Sho8 FQWUuH+ipMDC7qGtZIAVh6L68FOY8E1w/adB5EgYoQad1ofkVNALeziwIpf1ld15T+Hj y//efwVgwzPiXib8e74EzOs2lxwjRsfdl7J1QQp2V0xNR8mkc4i5PRZtq7UUoMsyPRr0 9wgQ== X-Gm-Message-State: AOAM533olb5Awaw31tcprFr1D+/BgovPUP4u2qq6+DcUZBnK/XXpmpDm Qn5DrXp0F9Ofyh/tNDnySaW1mw== X-Google-Smtp-Source: ABdhPJxaJAV0tcgV60jZPuUhPhAM+kBk7DrSLOC/sNdq/5HT5rxfHOCWAK9nQxO/9mQTmTTqCPherA== X-Received: by 2002:a05:6a00:1a09:b0:4e1:67a7:2c87 with SMTP id g9-20020a056a001a0900b004e167a72c87mr32533882pfv.37.1646219134666; Wed, 02 Mar 2022 03:05:34 -0800 (PST) Received: from localhost.localdomain ([171.50.175.145]) by smtp.gmail.com with ESMTPSA id hk1-20020a17090b224100b001b8cff17f89sm5049186pjb.12.2022.03.02.03.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 03:05:34 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, agross@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, sboyd@kernel.org, tdas@codeaurora.org, mturquette@baylibre.com, linux-clk@vger.kernel.org, robh+dt@kernel.org, Vinod Koul , Rob Herring Subject: [PATCH v2 1/5] dt-bindings: net: qcom,ethqos: Document SM8150 SoC compatible Date: Wed, 2 Mar 2022 16:35:04 +0530 Message-Id: <20220302110508.69053-2-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220302110508.69053-1-bhupesh.sharma@linaro.org> References: <20220302110508.69053-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Vinod Koul SM8150 has a ethernet controller and needs a different configuration so add a new compatible for this Acked-by: Rob Herring Signed-off-by: Vinod Koul --- Documentation/devicetree/bindings/net/qcom,ethqos.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.txt b/Docume= ntation/devicetree/bindings/net/qcom,ethqos.txt index fcf5035810b5..1f5746849a71 100644 --- a/Documentation/devicetree/bindings/net/qcom,ethqos.txt +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.txt @@ -7,7 +7,9 @@ This device has following properties: =20 Required properties: =20 -- compatible: Should be qcom,qcs404-ethqos" +- compatible: Should be one of: + "qcom,qcs404-ethqos" + "qcom,sm8150-ethqos" =20 - reg: Address and length of the register set for the device =20 --=20 2.35.1 From nobody Tue Jun 23 16:16:05 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63BF9C433F5 for ; Wed, 2 Mar 2022 11:05:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241240AbiCBLGc (ORCPT ); Wed, 2 Mar 2022 06:06:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241185AbiCBLGW (ORCPT ); Wed, 2 Mar 2022 06:06:22 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A7824B422 for ; Wed, 2 Mar 2022 03:05:39 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id z12-20020a17090ad78c00b001bf022b69d6so346081pju.2 for ; Wed, 02 Mar 2022 03:05:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GBQoREQeTbmDxGp575UEke733214jz66JUBFcdmxOO0=; b=XPc1jQUAv0qn6kIZ+n2Wk2fRjUpXTLK/E3E+R1hhxlnMkio6OSmRSr1mSz9wqSWTFU ePxDTabTXEUTT+CyqEEE9XC8Wx4jDu41rJXG8rL7O8QNf0fPWjmrC9p8qZlTibscmG5s ocfAMvt8sYU7ZyUKKaf8rCP0snCW5BGNxXWIIgCSDdd72CYzBBy0eW7OuHd1+enOPT0I ntlRd96iHJ6q/B5DWIFLCSLD/r33z3TAobtEYHs0Hzafn5wrvx5jY/n9hRwlnlspt4jS 1zY18O4uMrp5kGCgGpnDv2szcbU3ZIKlFTtk6boHbOmgNkoSmLTkbPI/uAl6sZQBt2GN lAFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GBQoREQeTbmDxGp575UEke733214jz66JUBFcdmxOO0=; b=ffN5zEySmdylJ2NhnfTvxsvQ9Q97JLfLqjyrYDv6ZuxneK7ES+fswhyctt8RfLGY66 3sbEtrYac+l6TKsDxOmuYHen/NsWsr3RyiZwC8OLqK6xfj7HTwIFH9A5Vyql2L0pIk9o irSz1M+JvkvJL7KgsCL/23B4Y75gW194MBJUMTqzR/KAkPSHS6/pLU8G/aH+EMQpZcGi r8XaqYW4t66VrZq1GV+dw3/2Wxd8C1amPkiBcCt8d05oZl/pHupFAeE47Do+SCTwZh85 cuOBMq2hIE/xHrthgLo5ysZB8BtDUCbzj2/5s2C7gZ2uwgMagq/Pe5WC7QgR3xBOCPA3 d6Zw== X-Gm-Message-State: AOAM530v/x9T8reHDqNnSXIUMNDfwDjXh0/mjBEfdnR0AHnjlBZyjYCk gB15Xjf21aRTF+0F/W6B+F5p6Ddwqnz/1Q== X-Google-Smtp-Source: ABdhPJxW9I58ByWFSkIjzaInrqS2x1W8zDYYj3hHPEy54tphpEVvT64oo9Dl2pM/jOfSW/3gMfglew== X-Received: by 2002:a17:90a:f02:b0:1bd:ab6:42ec with SMTP id 2-20020a17090a0f0200b001bd0ab642ecmr22831010pjy.18.1646219138899; Wed, 02 Mar 2022 03:05:38 -0800 (PST) Received: from localhost.localdomain ([171.50.175.145]) by smtp.gmail.com with ESMTPSA id hk1-20020a17090b224100b001b8cff17f89sm5049186pjb.12.2022.03.02.03.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 03:05:38 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, agross@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, sboyd@kernel.org, tdas@codeaurora.org, mturquette@baylibre.com, linux-clk@vger.kernel.org, robh+dt@kernel.org, Bjorn Andersson Subject: [PATCH v2 2/5] clk: qcom: gcc: Add emac GDSC support for SM8150 Date: Wed, 2 Mar 2022 16:35:05 +0530 Message-Id: <20220302110508.69053-3-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220302110508.69053-1-bhupesh.sharma@linaro.org> References: <20220302110508.69053-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add the EMAC GDSC defines and driver structures for SM8150. Cc: Stephen Boyd Cc: Bjorn Andersson Signed-off-by: Bhupesh Sharma --- drivers/clk/qcom/gcc-sm8150.c | 34 +++++++++++++-------- include/dt-bindings/clock/qcom,gcc-sm8150.h | 1 + 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/clk/qcom/gcc-sm8150.c b/drivers/clk/qcom/gcc-sm8150.c index 245794485719..08ba29e3a835 100644 --- a/drivers/clk/qcom/gcc-sm8150.c +++ b/drivers/clk/qcom/gcc-sm8150.c @@ -3448,22 +3448,31 @@ static struct clk_branch gcc_video_xo_clk =3D { }, }; =20 +static struct gdsc emac_gdsc =3D { + .gdscr =3D 0x6004, + .pd =3D { + .name =3D "emac_gdsc", + }, + .pwrsts =3D PWRSTS_OFF_ON, + .flags =3D POLL_CFG_GDSCR, +}; + static struct gdsc usb30_prim_gdsc =3D { - .gdscr =3D 0xf004, - .pd =3D { - .name =3D "usb30_prim_gdsc", - }, - .pwrsts =3D PWRSTS_OFF_ON, - .flags =3D POLL_CFG_GDSCR, + .gdscr =3D 0xf004, + .pd =3D { + .name =3D "usb30_prim_gdsc", + }, + .pwrsts =3D PWRSTS_OFF_ON, + .flags =3D POLL_CFG_GDSCR, }; =20 static struct gdsc usb30_sec_gdsc =3D { - .gdscr =3D 0x10004, - .pd =3D { - .name =3D "usb30_sec_gdsc", - }, - .pwrsts =3D PWRSTS_OFF_ON, - .flags =3D POLL_CFG_GDSCR, + .gdscr =3D 0x10004, + .pd =3D { + .name =3D "usb30_sec_gdsc", + }, + .pwrsts =3D PWRSTS_OFF_ON, + .flags =3D POLL_CFG_GDSCR, }; =20 static struct clk_regmap *gcc_sm8150_clocks[] =3D { @@ -3714,6 +3723,7 @@ static const struct qcom_reset_map gcc_sm8150_resets[= ] =3D { }; =20 static struct gdsc *gcc_sm8150_gdscs[] =3D { + [EMAC_GDSC] =3D &emac_gdsc, [USB30_PRIM_GDSC] =3D &usb30_prim_gdsc, [USB30_SEC_GDSC] =3D &usb30_sec_gdsc, }; diff --git a/include/dt-bindings/clock/qcom,gcc-sm8150.h b/include/dt-bindi= ngs/clock/qcom,gcc-sm8150.h index 3e1a91876610..40596b9ded06 100644 --- a/include/dt-bindings/clock/qcom,gcc-sm8150.h +++ b/include/dt-bindings/clock/qcom,gcc-sm8150.h @@ -243,5 +243,6 @@ /* GCC GDSCRs */ #define USB30_PRIM_GDSC 4 #define USB30_SEC_GDSC 5 +#define EMAC_GDSC 6 =20 #endif --=20 2.35.1 From nobody Tue Jun 23 16:16:05 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFC95C433EF for ; Wed, 2 Mar 2022 11:05:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241235AbiCBLGj (ORCPT ); Wed, 2 Mar 2022 06:06:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241170AbiCBLG1 (ORCPT ); Wed, 2 Mar 2022 06:06:27 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F050E6F485 for ; Wed, 2 Mar 2022 03:05:43 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id bd1so1232588plb.13 for ; Wed, 02 Mar 2022 03:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=20eucF22WnDJBIef+XBNRtcVtRBLlgGa2MbsKG7djtE=; b=GxpzHF9vAhlw5dsZA6dVrtQJDEW1mDu0I9prpCSyYQGnxxptQXt0B120lBo5QArybe K49QanJd8cVqrNO5F0PwdUp3GVO74lgbHjRrb95VZSOavtRL5r6noTM0vjEvAV020mSR cdfNyE+vHqEDWnRCo+fE6Y08NhEOlpJzuKjL+aRoCaHEqEjgw6Va54k5jwrejtGQdj80 QOpBSIzEafWNCEWFxL7mNbNwv04udkL6fJXuPChUcBdengvGVgIJXkV6cONoRrKZsQOD /AxhoieozYtXwda1q9Otnwdfhw0Qf4crGsIcIf3nskViTWO7kQqdCvKwQQ6OcuUFqTjB XbNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=20eucF22WnDJBIef+XBNRtcVtRBLlgGa2MbsKG7djtE=; b=cx4P9Ib2vxl5r/xPwkapMKz4ZEBODcKWataM3fQJSigPQbH5Vsf5TiunJzAr3G5dMl 9KqRnGvyW+6HUvh0Yc4CzJI106xTJm9QFrb6h06bDOwcntgqQJh1AxEP1F0Q52bxUpRI 8DlpcRG0sAtl7GZbVtnaB2V8wkyxs7wkKu7xIOyMG5l3yCUlQ/il3SX/3h5T+o/s6Jly ZOACQpVo+lNDHcv46IJn4ofaFOHA7TmwLtpd8+JF+J5HWlXv9/JwKHAZWSl9GFULof/Z ezp+eCrqPnHudez8yjv5h6HwZukqsafafIepqK/P+/rcFKiHiiLrQpn6Ivrbua1cMO+b qRXw== X-Gm-Message-State: AOAM532kGd7qqeDTD7vTjOdtCFVmpM9juIznm2qMtktnIEfuJmQtnIQx VIUEjq4avfMXqcxUHW35zGXDpQ== X-Google-Smtp-Source: ABdhPJzPnPURDL5k7XnfU89eVXyIfxS/JHhGyxe5U0Hzv/k46xPO8cv2uY4Cxl94DNAQ/LQz/cAM4A== X-Received: by 2002:a17:902:ec88:b0:14f:d5fb:7a8c with SMTP id x8-20020a170902ec8800b0014fd5fb7a8cmr29734753plg.5.1646219143349; Wed, 02 Mar 2022 03:05:43 -0800 (PST) Received: from localhost.localdomain ([171.50.175.145]) by smtp.gmail.com with ESMTPSA id hk1-20020a17090b224100b001b8cff17f89sm5049186pjb.12.2022.03.02.03.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 03:05:43 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, agross@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, sboyd@kernel.org, tdas@codeaurora.org, mturquette@baylibre.com, linux-clk@vger.kernel.org, robh+dt@kernel.org, Bjorn Andersson Subject: [PATCH v2 3/5] clk: qcom: gcc-sm8150: Use ALWAYS_ON flag as a workaround for emac gdsc Date: Wed, 2 Mar 2022 16:35:06 +0530 Message-Id: <20220302110508.69053-4-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220302110508.69053-1-bhupesh.sharma@linaro.org> References: <20220302110508.69053-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" emac GDSC currently has issues (seen on SA8155p-ADP) when its turn'ed ON, once its already in OFF state. So when the 'eth' interface is turned up, it fails (as RGMII CLK is unavailable, which is gated by emac GDSC) with the following logs: qcom-ethqos 20000.ethernet eth0: PHY [stmmac-0:07] driver [Micrel KSZ9031 Gigabit PHY] (irq=3D150) <..snip..> qcom-ethqos 20000.ethernet: Failed to reset the dma qcom-ethqos 20000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed qcom-ethqos 20000.ethernet eth0: stmmac_open: Hw setup failed So, use the 'ALWAYS_ON' flag as a workaround to describe emac GDSC for now. Cc: Bjorn Andersson Cc: Stephen Boyd Signed-off-by: Bhupesh Sharma --- drivers/clk/qcom/gcc-sm8150.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gcc-sm8150.c b/drivers/clk/qcom/gcc-sm8150.c index 08ba29e3a835..76485bff7240 100644 --- a/drivers/clk/qcom/gcc-sm8150.c +++ b/drivers/clk/qcom/gcc-sm8150.c @@ -3454,7 +3454,13 @@ static struct gdsc emac_gdsc =3D { .name =3D "emac_gdsc", }, .pwrsts =3D PWRSTS_OFF_ON, - .flags =3D POLL_CFG_GDSCR, + /* + * FIXME: emac GDSC cannot resume after GDSC power off: + * qcom-ethqos 20000.ethernet: Failed to reset the dma + * + * So use ALWAYS_ON flag as a workaround. + */ + .flags =3D ALWAYS_ON, }; =20 static struct gdsc usb30_prim_gdsc =3D { --=20 2.35.1 From nobody Tue Jun 23 16:16:05 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4016FC433F5 for ; Wed, 2 Mar 2022 11:06:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241299AbiCBLGs (ORCPT ); Wed, 2 Mar 2022 06:06:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241259AbiCBLGe (ORCPT ); Wed, 2 Mar 2022 06:06:34 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA0457EDA3 for ; Wed, 2 Mar 2022 03:05:48 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id em10-20020a17090b014a00b001bc3071f921so4461876pjb.5 for ; Wed, 02 Mar 2022 03:05:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vmDFo76a8otWYPkle6/ziOHDKrQe2qvu7laZ0IuPxgk=; b=IzpfZk50nXuiVWgNMU72JSSGrmI9Qt1iKGALVQkGV8dBZJpTQUW0eOWvJ5Stmxgo93 rdAZG/lvGUdWsKuepZ3mR7eQYZav1EoB4LjL0OyxAIRB04RI+uf5Qm/rMXYhJelVMmzA pBHGuT5c1wZ7QYFVvIaiVWX8utoBS9RgPkJPpPwkQCWJRNnktAN3PvHrjAuXsgyomg2/ lCzI1yuS0s7RVQFcqUcntBVJGBy4QG4S7BitPN4HXwnDqcotd2f2s4Cf9Kna4J7DCU78 JPlMAk6yEKY1TIUaq9KlVPXlz4v9qcOsprprhKG5DuFt8SfZkAoyOEjAc7XlHsc7VN0z +qbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vmDFo76a8otWYPkle6/ziOHDKrQe2qvu7laZ0IuPxgk=; b=mTDo8bDhgC23mwau0OopC3ARQhlLgUEteINl6hNkM+xDoMpvenZZJsuxT2TXbKng5M s7oVH/yjYakca43XMT5hLgvkb0HElTxD5qVNCcLTZH0qQD0t3/Pd8xfv3nGkDJ2COLkP FzwRCY2urbuPV+c7lSLAPLphGzE6HtlUpkKoaVnsbdLXODto9c3dTgU7+LaCLiMPmk+R Udf3XTFLU+z+SeU8NrpfhOqZNDJIErHvwc6eDbMqBWWKHmzYluJdQDcdmAjBhw4ZUzIC OjQQwvm+2pcKBYv3ZqsbO80dVi+2CyLRTeGNyn+pMvxLr3C90gMIjtCfMZkNcpJG9xaL fwuA== X-Gm-Message-State: AOAM533caN2evEeSB5nq+J/Q7siIVWwFOiedS7pow3sGTNZyZPWvZhbQ bJ14dv1ozD8j9HG4UdhbUZ24rw== X-Google-Smtp-Source: ABdhPJxoUZGbwWKrd44OrQlUtT7O1K8fuDhbVMyfeMvTHmOKBbYfk2J0LIulRhny4EvTsNQ1UAv1Wg== X-Received: by 2002:a17:90a:4b45:b0:1be:da4b:a56a with SMTP id o5-20020a17090a4b4500b001beda4ba56amr8115077pjl.82.1646219148073; Wed, 02 Mar 2022 03:05:48 -0800 (PST) Received: from localhost.localdomain ([171.50.175.145]) by smtp.gmail.com with ESMTPSA id hk1-20020a17090b224100b001b8cff17f89sm5049186pjb.12.2022.03.02.03.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 03:05:47 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, agross@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, sboyd@kernel.org, tdas@codeaurora.org, mturquette@baylibre.com, linux-clk@vger.kernel.org, robh+dt@kernel.org, Vinod Koul , Bjorn Andersson Subject: [PATCH v2 4/5] arm64: dts: qcom: sm8150: add ethernet node Date: Wed, 2 Mar 2022 16:35:07 +0530 Message-Id: <20220302110508.69053-5-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220302110508.69053-1-bhupesh.sharma@linaro.org> References: <20220302110508.69053-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Vinod Koul SM8150 SoC supports ethqos ethernet controller so add the node for it Cc: Bjorn Andersson Signed-off-by: Vinod Koul [bhsharma: Correct ethernet interrupt numbers and add power-domain] Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qco= m/sm8150.dtsi index 6012322a5984..2ed231767535 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -915,6 +915,33 @@ gpi_dma0: dma-controller@800000 { status =3D "disabled"; }; =20 + ethernet: ethernet@20000 { + compatible =3D "qcom,sm8150-ethqos"; + reg =3D <0x0 0x00020000 0x0 0x10000>, + <0x0 0x00036000 0x0 0x100>; + reg-names =3D "stmmaceth", "rgmii"; + clock-names =3D "stmmaceth", "pclk", "ptp_ref", "rgmii"; + clocks =3D <&gcc GCC_EMAC_AXI_CLK>, + <&gcc GCC_EMAC_SLV_AHB_CLK>, + <&gcc GCC_EMAC_PTP_CLK>, + <&gcc GCC_EMAC_RGMII_CLK>; + interrupts =3D , + ; + interrupt-names =3D "macirq", "eth_lpi"; + + power-domains =3D <&gcc EMAC_GDSC>; + resets =3D <&gcc GCC_EMAC_BCR>; + + iommus =3D <&apps_smmu 0x3C0 0x0>; + + snps,tso; + rx-fifo-depth =3D <4096>; + tx-fifo-depth =3D <4096>; + + status =3D "disabled"; + }; + + qupv3_id_0: geniqup@8c0000 { compatible =3D "qcom,geni-se-qup"; reg =3D <0x0 0x008c0000 0x0 0x6000>; --=20 2.35.1 From nobody Tue Jun 23 16:16:05 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4327C433FE for ; Wed, 2 Mar 2022 11:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241252AbiCBLGw (ORCPT ); Wed, 2 Mar 2022 06:06:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241225AbiCBLGm (ORCPT ); Wed, 2 Mar 2022 06:06:42 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 202AC46653 for ; Wed, 2 Mar 2022 03:05:53 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id gb21so1441248pjb.5 for ; Wed, 02 Mar 2022 03:05:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=31oR/5R8uiOoYLaqojfd9sfVOvx41Qx3BFeK4/Ytd84=; b=At4zU4shHEmJqgXsvdpIlpcNKb/1D5xR+vm2ACNKVXjaecQc51lvkgMGU7RJe7P4IQ 7TpGTETBaFOEaYnf5fMcZd5DeECI2tZr2PEsL9A0ljMbw8EFIppR2ogsrf2IqbAoJ/IO RoKxXM24uFcdNc1ws28Nn0NkXW91PJd5FZMzZsT/1irCiBI8dXsQ2ShSu3ecKlAm58U/ y09E9p9MvKt1kvx1szrqD+oE4hxBnKzlGNeZaWmQivYHE1bx25EUPydjTveDKicysD6B VEoCYh8I6/s4L7qtGVFgKey6R7lFIP2ZksRmyPuYQFdBPKCIONz+pQWGfhxWi4ttyJ6I a65Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=31oR/5R8uiOoYLaqojfd9sfVOvx41Qx3BFeK4/Ytd84=; b=l5UxZ4I5LwV4IDCo+Hkipg6CTGffM6wKVCNMINAKHzakOzKkyLodR9hu3ccG76huZ8 6zKFfmuJqkg2dxu66CDn1fexy+V5dMU2BaHF0cY/7MZGtquyesxsfyzTbAOuexLDK1eU kjGa+PhLVxUA4WnzSap723UW3h8+Hwi+5cCX/wi++AdapDLtzF4FK21NtoOenbmOfJvH sNDWb3U8U7DKIUl5It5H0MA969+kect3ABWMp0YmpP5t67E30Pj/reCwY1FaBTIFBkte lpB7hBUa28Ub9C55CYvZ+lc9zK2Y1SLgdJD+FgVapuw/YA8D8Q+WBYmn1j+SrHxtGi/m s3Rg== X-Gm-Message-State: AOAM530a+fXP/FWGDEm4mD22+cUpOaA/dWLvsCupwDsScT/z0VXUT4q1 uQ3tamZG6m1YZyzxGeDAcwSikw== X-Google-Smtp-Source: ABdhPJxSbxvCb0rvr3EAZIz1KY6zF0rK1ThfoOP2vyrgJijNdBkpiwk/lGAKFU73doZnK2Z8RpsDGg== X-Received: by 2002:a17:90a:dc81:b0:1bd:2d28:4bf4 with SMTP id j1-20020a17090adc8100b001bd2d284bf4mr18701085pjv.206.1646219152594; Wed, 02 Mar 2022 03:05:52 -0800 (PST) Received: from localhost.localdomain ([171.50.175.145]) by smtp.gmail.com with ESMTPSA id hk1-20020a17090b224100b001b8cff17f89sm5049186pjb.12.2022.03.02.03.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 03:05:52 -0800 (PST) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org Cc: bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, agross@kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, sboyd@kernel.org, tdas@codeaurora.org, mturquette@baylibre.com, linux-clk@vger.kernel.org, robh+dt@kernel.org, Vinod Koul , Bjorn Andersson Subject: [PATCH v2 5/5] arm64: dts: qcom: sa8155p-adp: Enable ethernet node Date: Wed, 2 Mar 2022 16:35:08 +0530 Message-Id: <20220302110508.69053-6-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220302110508.69053-1-bhupesh.sharma@linaro.org> References: <20220302110508.69053-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Vinod Koul Enable the etheret node, add the phy node and pinctrl for ethernet. Cc: Bjorn Andersson Signed-off-by: Vinod Koul [bhsharma: Correct ethernet/rgmii related pinmuxs, specify multi-queues and plug in the PHY interrupt for WOL] Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 144 +++++++++++++++++++++++ 1 file changed, 144 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts b/arch/arm64/boot/dts= /qcom/sa8155p-adp.dts index 8756c2b25c7e..474f688f14a2 100644 --- a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts +++ b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts @@ -47,6 +47,65 @@ vreg_s4a_1p8: smps4 { =20 vin-supply =3D <&vreg_3p3>; }; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use =3D <4>; + snps,rx-sched-sp; + + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel =3D <0x0>; + snps,route-up; + snps,priority =3D <0x1>; + }; + + queue1 { + snps,dcb-algorithm; + snps,map-to-dma-channel =3D <0x1>; + snps,route-ptp; + }; + + queue2 { + snps,avb-algorithm; + snps,map-to-dma-channel =3D <0x2>; + snps,route-avcp; + }; + + queue3 { + snps,avb-algorithm; + snps,map-to-dma-channel =3D <0x3>; + snps,priority =3D <0xC>; + }; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use =3D <4>; + snps,tx-sched-wrr; + + queue0 { + snps,weight =3D <0x10>; + snps,dcb-algorithm; + snps,priority =3D <0x0>; + }; + + queue1 { + snps,weight =3D <0x11>; + snps,dcb-algorithm; + snps,priority =3D <0x1>; + }; + + queue2 { + snps,weight =3D <0x12>; + snps,dcb-algorithm; + snps,priority =3D <0x2>; + }; + + queue3 { + snps,weight =3D <0x13>; + snps,dcb-algorithm; + snps,priority =3D <0x3>; + }; + }; }; =20 &apps_rsc { @@ -317,6 +376,42 @@ &remoteproc_cdsp { firmware-name =3D "qcom/sa8155p/cdsp.mdt"; }; =20 +ðernet { + status =3D "okay"; + + snps,reset-gpio =3D <&tlmm 79 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us =3D <0 11000 70000>; + + snps,ptp-ref-clk-rate =3D <250000000>; + snps,ptp-req-clk-rate =3D <96000000>; + + snps,mtl-rx-config =3D <&mtl_rx_setup>; + snps,mtl-tx-config =3D <&mtl_tx_setup>; + + pinctrl-names =3D "default"; + pinctrl-0 =3D <ðernet_defaults>; + + phy-handle =3D <&rgmii_phy>; + phy-mode =3D "rgmii"; + mdio { + #address-cells =3D <0x1>; + #size-cells =3D <0x0>; + + compatible =3D "snps,dwmac-mdio"; + + /* Micrel KSZ9031RNZ PHY */ + rgmii_phy: phy@7 { + reg =3D <0x7>; + + interrupt-parent =3D <&tlmm>; + interrupts-extended =3D <&tlmm 124 IRQ_TYPE_EDGE_FALLING>; /* phy intr = */ + device_type =3D "ethernet-phy"; + compatible =3D "ethernet-phy-ieee802.3-c22"; + }; + }; +}; + &uart2 { status =3D "okay"; }; @@ -407,4 +502,53 @@ mux { drive-strength =3D <2>; }; }; + + ethernet_defaults: ethernet-defaults { + mdc { + pins =3D "gpio7"; + function =3D "rgmii"; + bias-pull-up; + }; + + mdio { + pins =3D "gpio59"; + function =3D "rgmii"; + bias-pull-up; + }; + + rgmii-rx { + pins =3D "gpio117", "gpio118", "gpio119", "gpio120", "gpio115", "gpio11= 6"; + function =3D "rgmii"; + bias-disable; + drive-strength =3D <2>; + }; + + rgmii-tx { + pins =3D "gpio122", "gpio4", "gpio5", "gpio6", "gpio114", "gpio121"; + function =3D "rgmii"; + bias-pull-up; + drive-strength =3D <16>; + }; + + phy-intr { + pins =3D "gpio124"; + function =3D "emac_phy"; + bias-disable; + drive-strength =3D <8>; + }; + + pps { + pins =3D "gpio81"; + function =3D "emac_pps"; + bias-disable; + drive-strength =3D <8>; + }; + + phy-reset { + pins =3D "gpio79"; + function =3D "gpio"; + bias-pull-up; + drive-strength =3D <16>; + }; + }; }; --=20 2.35.1