From patchwork Thu May 6 11:15:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12242031 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.8 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 8721CC433B4 for ; Thu, 6 May 2021 11:17:46 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 77DF361185 for ; Thu, 6 May 2021 11:17:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77DF361185 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-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=fAFZ2OKCm99TuUdUEUfnGLygegZtnkJhbXQ9TxULNps=; b=W3cJW2Pz/ONfbMqTTRDZww6UL yPezipBc5I+YVzbq7aeUjapugCF8sDfT6t5uf798MmnfaHughIPONE2auXvNzNY+4EkIg+KIjVxCS FQoh9CxBZnvK0hgEyakkEaS9uUT7IyVyopIHiK4cx7JxraAFrxbmvaI2udqqTP9SRzfe0UTn3luS2 2koanWxnEH/eCnoDV4cvF7MLbwrnTmJocMeb2RaE0OXEldjWGrYgCPpX/RBoglxGUYlEYC4LcFjaf 3CCNpuj4Dfo6Q0euw9kWj0RsHM8V636VTGCUH+X7FatiVG7csZWobI+YEjQzrtrmz4d2XAs6pXzeT s5vKVN8nA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lec0k-0046W9-Ob; Thu, 06 May 2021 11:17:42 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebyl-0046Cf-D0 for linux-phy@desiato.infradead.org; Thu, 06 May 2021 11:15:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=yB+63PgRDM1iyviDORNDC1cNZU2QIzi0OniCvWqYcas=; b=nZyNGwD4JeE03lkIvLbAc9iBqg YZ90yvXJxXtHsOwlZXJtxgexd31dhm814ZjgQfSlWy/LENJZctbydieFf3P8E+eZA0ViMwDK7hfKs NhNaBW3UeS6TPMzeCDgoxufE7sqL6Nqgdjy23G5fvMPeilMiGefN4z/auCufAU6kPKaKC4JysdtI4 MenlyH+qnW5RGb4/HQ0kveF3OKBJfYty+L2cOuK+eRCotbT+kJ69//sB2KuG4k7nJCn/z7i+qx1YP D/jOLwlUDipvQ3ozsMBuIfa2e6z6Sbw1vT2p710y2svPYSW2br253XXbbkg7+WdGJV5m/L7k9+se1 65pYMY7A==; Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebyi-005ygF-WB for linux-phy@lists.infradead.org; Thu, 06 May 2021 11:15:38 +0000 Received: by mail-wm1-x331.google.com with SMTP id s82so3147524wmf.3 for ; Thu, 06 May 2021 04:15:36 -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=yB+63PgRDM1iyviDORNDC1cNZU2QIzi0OniCvWqYcas=; b=r5MNcwCk/unl+3evjl1ScAq7BM1g7s0th1VDYBoe31faBujaA8UxZV/AxfibTG4gdg 2CVeoKS2qXJun3cABqZGXijgW3sp/MQbDojoMTOb578htTrFotqlGRUdm9LyvRnVOrgU PJJD7mre6+zIyjlLZj5TLbGfZL0mYCHSDrO8yPS3tumjtsUx3Ydf1noHAYFuTS1YKT0m /oS1eUXTCekbWsKcw/6MHZeNB04mHSc0HxI1njeK3md3VN6LZMNPnK94HPEDGv+zeD4Z nBID16zPinnRGBpsxUPBxUt7xeo+K9oajkJjjdSdH3tot4/a/KffYdjcAnCf55IyNvkK /uVQ== 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=yB+63PgRDM1iyviDORNDC1cNZU2QIzi0OniCvWqYcas=; b=av+nsiEuJKzR1U/0vsGEpo481YlJRB2RpSv2xvrKfcJZWhOhnTsWC8itoPPJX8nC8Q qFt5fXvEGj/mWImxCLWvi+y0DhM4uOt1zTPXFtoRZsmDwPnht7CKZshlZuqRGyl3av96 jY9kdLCI9oY5hHHqpc0iWUNOZv1X0i12y4sG623X5GpM15Ffg/9dsnIqx1kA/G9OoZXw gadaBVs5ZYxgU/Uq18BatGFAePzTmEOu1DPctSsGPh7jx54nnzfPgwWgarKm+u1uSQ18 UpwVoFZa215/LEPJNfacHfWWBdJcCkewIcbcTOg+8Uyz+lNV7lygVH+2/J7OYPddf0dX XQUg== X-Gm-Message-State: AOAM533g4KSYRrxxA6N6h4W0qMFQ570kp+peQk5i/vdTMU0WxB9EfWES kzgPRwPOFeKw1Ss8BWAWQw4= X-Google-Smtp-Source: ABdhPJwQfzxRYHpKnPIQCx/PqOoEanXnfY+4NyrQ2w7d5BnNcUH2wVkxSbnS4mrZ1TPCAsEetdFZYg== X-Received: by 2002:a7b:cc83:: with SMTP id p3mr3374846wma.170.1620299735254; Thu, 06 May 2021 04:15:35 -0700 (PDT) Received: from localhost.localdomain (231.red-83-51-243.dynamicip.rima-tde.net. [83.51.243.231]) by smtp.gmail.com with ESMTPSA id u5sm3642433wrt.38.2021.05.06.04.15.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 May 2021 04:15:34 -0700 (PDT) From: Sergio Paracuellos To: vkoul@kernel.org Cc: linux-phy@lists.infradead.org, kishon@ti.com, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, gregkh@linuxfoundation.org, neil@brown.name, ilya.lipnitskiy@gmail.com Subject: [PATCH 1/5] staging: mt7621-dts: use clock in pci phy nodes Date: Thu, 6 May 2021 13:15:27 +0200 Message-Id: <20210506111531.21978-2-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210506111531.21978-1-sergio.paracuellos@gmail.com> References: <20210506111531.21978-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_041537_050966_04D42258 X-CRM114-Status: GOOD ( 10.38 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org MT7621 SoC clock driver has already mainlined in 'commit 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC")' Hence we can use the clock in pcie phy nodes to be able to get it from there in driver code. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-dts/mt7621.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/drivers/staging/mt7621-dts/mt7621.dtsi index 5623d542bcf2..001ff8f51033 100644 --- a/drivers/staging/mt7621-dts/mt7621.dtsi +++ b/drivers/staging/mt7621-dts/mt7621.dtsi @@ -549,12 +549,16 @@ pcie@2,0 { pcie0_phy: pcie-phy@1e149000 { compatible = "mediatek,mt7621-pci-phy"; reg = <0x1e149000 0x0700>; + clocks = <&sysc MT7621_CLK_XTAL>; + clock-names = "sys_clk"; #phy-cells = <1>; }; pcie2_phy: pcie-phy@1e14a000 { compatible = "mediatek,mt7621-pci-phy"; reg = <0x1e14a000 0x0700>; + clocks = <&sysc MT7621_CLK_XTAL>; + clock-names = "sys_clk"; #phy-cells = <1>; }; }; From patchwork Thu May 6 11:15:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12242035 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.8 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 89409C43461 for ; Thu, 6 May 2021 11:17:46 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 E2B90611CB for ; Thu, 6 May 2021 11:17:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2B90611CB 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-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=qIQmSMI6Tqjb8CH0LXCAcYctozuL+AILswCfLUPAmtM=; b=lcd7knadSqGK77f9Q98rvpSWF zQc2ywNluV7jWb+3wlANIXZqK2jCLt89N+esBWgaN3sfx+51W6k/Ibge/N5/D3tY8mRVJWOHeFjHg tPsGlBET4oHA7sFPdpOLGeMgIgXOuN7//h5Vz7piQOYXSos00YhQYvp06SS0siooLFsBid2lHiXja NfOc+C/Vt2fR6sL+BuLAmHBaUHNdW7BV2bQHeWPLfdko7FQnjf+B1SCe/GLEig3cC/4Ib4e4DwbJY /HAdiLIktb63c/pArdKimoyx/pO+zg6BH+srjemcrVbRTTTUfqOBEnL0arOUak5YqTdo7wBe7m+gf xUWXZtYkA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lec0l-0046WI-CY; Thu, 06 May 2021 11:17:43 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebym-0046Dg-Bn for linux-phy@desiato.infradead.org; Thu, 06 May 2021 11:15:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=bcj0pWWA8nFHZcaEeJrGAFY0Y2i6kRxQp4Wf+dRkrMc=; b=DDIjCy+/+QJ9EDYfs/CQVnTVLX Cz5KibCwOTan4eJ3UqXdp1zhcN3+DHsp/s1w8ZMsiBG1LzIX1B5P/RtsrHIerG9VR1fI26kTW8r4s 4Ik8RxUzHmSulu/O0tsEnZQVSDnM/W3uqP/lgFhrxNUvJSfVhLjuSipkd4oJ0Hu8UvFLplSxhJUgA SFmugOs2hrm/ss3OBcxYu1I7jskUJ8Oz1T17MZeKvayf/L6njGXFrtxMJVlIzyrfoEVFiuJEdhuCp TpCft8DXgUwr+4IoFfRyUxAFwmqWPFUelbUQWCaYGOLRwnuGWd7jmXhe6bDMWKwo/0V5mvG8QnP5x 8SQCi4UQ==; Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebyj-005ygK-UP for linux-phy@lists.infradead.org; Thu, 06 May 2021 11:15:39 +0000 Received: by mail-wr1-x42e.google.com with SMTP id x5so5165565wrv.13 for ; Thu, 06 May 2021 04:15:37 -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=bcj0pWWA8nFHZcaEeJrGAFY0Y2i6kRxQp4Wf+dRkrMc=; b=nx33U0MdKytL2LeL/A3OBCQcElimwWw/4yEPpHFwZbFDqisrnuREQLuAZyx6jvlrj5 58b3UFV9rfe94VikNAaI3ueEPEzBPPI+LdGlhP6ZOrbhn0oDAzn2XS6uyOGvYA+2NUb4 5/wGOKqulsUeNdvxzpb+ULOH/m6a1ggvUUwRszekCdlmOPSxOU8HFgjoNrL8JRhlJ1Wz MBgWZ4VCPS70SSWsFZVNMqkVCE1i50s7huEVZEx40X2N5gG7VzNMJO0FJfVyfTpLvAt3 6JrDRkA4VXw94kiB2n0LHLUE7Gywwcn/rSLvDehqTiOqtguPnMQ80xFnsF+znBHRqW6Y DybA== 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=bcj0pWWA8nFHZcaEeJrGAFY0Y2i6kRxQp4Wf+dRkrMc=; b=n1iw2ImZdI7BzQ2iqDaiVm6WuxczduID+pG+v7ztjYvqhghhpmUhR0U1M8Kugbr3oe aDXtkWi1ngzzEIKC/nU38lPntqAqERqA0H1uIuHsbpthGm9tqivPIhJkp4krSqVyXbd1 dcEhqBkbH0+pecSXUZWKTijb24+0UhjpVbBz1sARK02S/pFn5Cxkacx3TRrZtTSbu5n7 1apoLA9wAh82/xicNWJ9P7zbEP+TKxqptrdQqv9CRH55J+eXK6hi1zcZR8ZJq76eDPlR 61+2S0mft2a9sUORhNxap2eyesRJL12OhtpiWNwB/58xIW+21B8HFAObLJQNNehmz5v0 3vng== X-Gm-Message-State: AOAM532qeJnBLI2RH3uLQ8/rXbjWU+5HbZnz2vIfQ3J/wTWS6QmTMTCG U18CrPNZg6PoalSjFuHpkco= X-Google-Smtp-Source: ABdhPJxJ9grl1B/XxF/8opkBocpLHYlo2dk8HqNadhlsu7dvjNCfyEqecrxPRlVTxJXSiMy/6ZpGiQ== X-Received: by 2002:a05:6000:1541:: with SMTP id 1mr4539384wry.364.1620299736213; Thu, 06 May 2021 04:15:36 -0700 (PDT) Received: from localhost.localdomain (231.red-83-51-243.dynamicip.rima-tde.net. [83.51.243.231]) by smtp.gmail.com with ESMTPSA id u5sm3642433wrt.38.2021.05.06.04.15.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 May 2021 04:15:35 -0700 (PDT) From: Sergio Paracuellos To: vkoul@kernel.org Cc: linux-phy@lists.infradead.org, kishon@ti.com, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, gregkh@linuxfoundation.org, neil@brown.name, ilya.lipnitskiy@gmail.com Subject: [PATCH 2/5] dt-bindings: phy: mediatek, mt7621-pci-phy: add clock entries Date: Thu, 6 May 2021 13:15:28 +0200 Message-Id: <20210506111531.21978-3-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210506111531.21978-1-sergio.paracuellos@gmail.com> References: <20210506111531.21978-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_041537_995846_4BDCCA76 X-CRM114-Status: UNSURE ( 9.60 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org MT7621 SoC clock driver has already mainlined in 'commit 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC")' Hence update schema with the add of the entries related to clock. Signed-off-by: Sergio Paracuellos --- .../bindings/phy/mediatek,mt7621-pci-phy.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/mediatek,mt7621-pci-phy.yaml b/Documentation/devicetree/bindings/phy/mediatek,mt7621-pci-phy.yaml index 0ccaded3f245..d8614ef8995c 100644 --- a/Documentation/devicetree/bindings/phy/mediatek,mt7621-pci-phy.yaml +++ b/Documentation/devicetree/bindings/phy/mediatek,mt7621-pci-phy.yaml @@ -16,6 +16,14 @@ properties: reg: maxItems: 1 + clocks: + maxItems: 1 + description: + PHY reference clock. Must contain an entry in clock-names. + + clock-names: + const: sys_clk + "#phy-cells": const: 1 description: selects if the phy is dual-ported @@ -23,6 +31,8 @@ properties: required: - compatible - reg + - clocks + - clock-names - "#phy-cells" additionalProperties: false @@ -32,5 +42,7 @@ examples: pcie0_phy: pcie-phy@1e149000 { compatible = "mediatek,mt7621-pci-phy"; reg = <0x1e149000 0x0700>; + clocks = <&sysc 0>; + clock-names = "sys_clk"; #phy-cells = <1>; }; From patchwork Thu May 6 11:15:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12242027 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.8 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=unavailable 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 DCC42C433ED for ; Thu, 6 May 2021 11:17:40 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 30BDA611AC for ; Thu, 6 May 2021 11:17:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30BDA611AC 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-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=9hqW5WPV1B2+xXLRPcIwFOEn3As2dsJv3QmCrMha2fk=; b=HPzBiQ7gBfyMxT/0uJn0L8l3/ xqRMD7W4s41WPnVmSmP/BLGIgPCG77ikY5OLxodUznCtviOzX7jX6vSwhYSd5fO36Kq9/2j6NNKbn uuGfMMJGzieY1Qkw6lDeE1Wf0ACkenru2ytQiLNGMXIQCbihcibWJxOUklDZRde8XeQlkd+rhCW5p 0agQoEwznPvzw4V3NHiQDbiRwKhDjyXj66+Almw+NgJAJMxCbGq7Xd2l8IBIH6wFluv4r9M76eVbV mduwuHh6lVyUuVuKsXqyDscvAXjoofS0YWUtu/Rq1mDWttN9gFnxGoCt2QqwkPPs9m8TXQoajZ0BC PrPMYQTIA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lec0g-0046VG-Cm; Thu, 06 May 2021 11:17:38 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebyn-0046Di-QB for linux-phy@desiato.infradead.org; Thu, 06 May 2021 11:15:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=VOXi5EtG92mh2v/zZTygCocGHAlghP72W6QLY75l19M=; b=yrjMvrxbW8Vt3/+8z+j2/7AN8w +x8ErbHVR/I+IeRa/PaNy3E3gf4MnKaT9Y9x9EgT2zdMvuTwOs56P8ibm9TSIKO7l5i7q+dwomVC6 uc/J2QMz6RHzTG3Lsqm9R25+THazX0YmeTa4gBp9DwTYg7Gn12Z1TQOfYTbymt3PEIOCk7j5gpip3 rerg96WbB6xI3mkCiYH3xhobZcQKt9FNl0QhAC9sSD6kmFuQMAwrCDTrVI8nvGUy1j7ZfkUNoHRMd r7Gzg19nIl+UJLpS90P2caRW0ert9w3RFCwfOZ3Ohp8bLrCSv4Fl9A416ZDwRO02rJefOh5nMKBJF y5/fDmSg==; Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebyl-005ygn-24 for linux-phy@lists.infradead.org; Thu, 06 May 2021 11:15:40 +0000 Received: by mail-wr1-x42f.google.com with SMTP id a4so5183091wrr.2 for ; Thu, 06 May 2021 04:15:38 -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=VOXi5EtG92mh2v/zZTygCocGHAlghP72W6QLY75l19M=; b=pxzkAsfKZcA/wdsw0ENtktQOC/JOklFuvalj3l4oV2eh/0PVIRtFGwo5o94vuPiHTH Djx8SpTlNUe7L4KNGvCEwHWWtWg0UlV2VTBmJ9R/vNnBL3EHrxKY0dpno4luiMjgxdaB ds2jPVljk9Mh2X8iqqTZdcjKv5E5ZWI+sEf6dt9EA2aOypj8HWQRSEMtVV8arFmAmlCP 935qE5O8zZKRUtSEu1A+lFMHzeSwfcPyVAucB13HRga8hPEReswn9G5k+g3BR5Bh1rLJ yBuf3V3EEva4jUCWi4qvyD4s2Zi5wxFrHrel4Ov1KpsYlFOSUis9eZcZQP8ps2HNxIQC qVTw== 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=VOXi5EtG92mh2v/zZTygCocGHAlghP72W6QLY75l19M=; b=ErrEnaFnFjxz/OMKLoZ0cxFNcs/rqStIWCctkKdP+FcupvW9DEQS6QsrEWeoFRx9KY OY/p17OQf1EO/FK3tfnXb7nwz0JU2AiZCd3apQwafmcYxJb33vxmBxTILmKovsui3lAJ hFkhZVxlMukL4TQo3yd35NuUHg6oPmwtogsolwO+XO7NefNEbBT8+L3OyArb0Phrp4Ik jyb0zdKQIMukhGcrqmwKiLoZo2NgtnWTPrr0e/APWzujRWjFM3JS/vV/HHwgf7+BoQrP StDF4XzVUZTfIAOED44zDchfpKd/zgz5rei8+85RsVngk4/UML674b8wDickk4jmucom 56UQ== X-Gm-Message-State: AOAM532VT7zz8JhZARnsMj2EbVn6CRFXyGZIO4FnRkrW9lsYriBGbOYY qFhvW1Z6zyGk6E3GMec/EHs= X-Google-Smtp-Source: ABdhPJxUEUmG7JhrrHTaTPsA7bglIxKepeD8Syw2pUKT/mf8O1Eob4CIrVJD5cakc4HURRW9j+p0sQ== X-Received: by 2002:adf:f152:: with SMTP id y18mr4480748wro.77.1620299737290; Thu, 06 May 2021 04:15:37 -0700 (PDT) Received: from localhost.localdomain (231.red-83-51-243.dynamicip.rima-tde.net. [83.51.243.231]) by smtp.gmail.com with ESMTPSA id u5sm3642433wrt.38.2021.05.06.04.15.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 May 2021 04:15:36 -0700 (PDT) From: Sergio Paracuellos To: vkoul@kernel.org Cc: linux-phy@lists.infradead.org, kishon@ti.com, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, gregkh@linuxfoundation.org, neil@brown.name, ilya.lipnitskiy@gmail.com Subject: [PATCH 3/5] phy: ralink: phy-mt7621-pci: use kernel clock APIS Date: Thu, 6 May 2021 13:15:29 +0200 Message-Id: <20210506111531.21978-4-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210506111531.21978-1-sergio.paracuellos@gmail.com> References: <20210506111531.21978-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_041539_122134_0B5BCB3C X-CRM114-Status: GOOD ( 21.18 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org MT7621 SoC clock driver has already mainlined in 'commit 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC")' This allow us to properly use kernel clock apis to get the clock frequency needed for the phy configuration instead of use custom architecture code to do the same. Signed-off-by: Sergio Paracuellos --- drivers/phy/ralink/phy-mt7621-pci.c | 33 +++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/drivers/phy/ralink/phy-mt7621-pci.c b/drivers/phy/ralink/phy-mt7621-pci.c index 753cb5bab930..5222edc7be10 100644 --- a/drivers/phy/ralink/phy-mt7621-pci.c +++ b/drivers/phy/ralink/phy-mt7621-pci.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -14,8 +15,6 @@ #include #include #include -#include -#include #define RG_PE1_PIPE_REG 0x02c #define RG_PE1_PIPE_RST BIT(12) @@ -62,8 +61,6 @@ #define RG_PE1_FRC_MSTCKDIV BIT(5) -#define XTAL_MASK GENMASK(8, 6) - #define MAX_PHYS 2 /** @@ -71,6 +68,7 @@ * @dev: pointer to device * @regmap: kernel regmap pointer * @phy: pointer to the kernel PHY device + * @sys_clk: pointer to the system XTAL clock * @port_base: base register * @has_dual_port: if the phy has dual ports. * @bypass_pipe_rst: mark if 'mt7621_bypass_pipe_rst' @@ -80,6 +78,7 @@ struct mt7621_pci_phy { struct device *dev; struct regmap *regmap; struct phy *phy; + struct clk *sys_clk; void __iomem *port_base; bool has_dual_port; bool bypass_pipe_rst; @@ -116,12 +115,14 @@ static void mt7621_bypass_pipe_rst(struct mt7621_pci_phy *phy) } } -static void mt7621_set_phy_for_ssc(struct mt7621_pci_phy *phy) +static int mt7621_set_phy_for_ssc(struct mt7621_pci_phy *phy) { struct device *dev = phy->dev; - u32 xtal_mode; + unsigned long clk_rate; - xtal_mode = FIELD_GET(XTAL_MASK, rt_sysc_r32(SYSC_REG_SYSTEM_CONFIG0)); + clk_rate = clk_get_rate(phy->sys_clk); + if (!clk_rate) + return -EINVAL; /* Set PCIe Port PHY to disable SSC */ /* Debug Xtal Type */ @@ -139,13 +140,13 @@ static void mt7621_set_phy_for_ssc(struct mt7621_pci_phy *phy) RG_PE1_PHY_EN, RG_PE1_FRC_PHY_EN); } - if (xtal_mode <= 5 && xtal_mode >= 3) { /* 40MHz Xtal */ + if (clk_rate == 40000000) { /* 40MHz Xtal */ /* Set Pre-divider ratio (for host mode) */ mt7621_phy_rmw(phy, RG_PE1_H_PLL_REG, RG_PE1_H_PLL_PREDIV, FIELD_PREP(RG_PE1_H_PLL_PREDIV, 0x01)); dev_dbg(dev, "Xtal is 40MHz\n"); - } else if (xtal_mode >= 6) { /* 25MHz Xal */ + } else if (clk_rate == 25000000) { /* 25MHz Xal */ mt7621_phy_rmw(phy, RG_PE1_H_PLL_REG, RG_PE1_H_PLL_PREDIV, FIELD_PREP(RG_PE1_H_PLL_PREDIV, 0x00)); @@ -196,13 +197,15 @@ static void mt7621_set_phy_for_ssc(struct mt7621_pci_phy *phy) mt7621_phy_rmw(phy, RG_PE1_H_PLL_BR_REG, RG_PE1_H_PLL_BR, FIELD_PREP(RG_PE1_H_PLL_BR, 0x00)); - if (xtal_mode <= 5 && xtal_mode >= 3) { /* 40MHz Xtal */ + if (clk_rate == 40000000) { /* 40MHz Xtal */ /* set force mode enable of da_pe1_mstckdiv */ mt7621_phy_rmw(phy, RG_PE1_MSTCKDIV_REG, RG_PE1_MSTCKDIV | RG_PE1_FRC_MSTCKDIV, FIELD_PREP(RG_PE1_MSTCKDIV, 0x01) | RG_PE1_FRC_MSTCKDIV); } + + return 0; } static int mt7621_pci_phy_init(struct phy *phy) @@ -212,9 +215,7 @@ static int mt7621_pci_phy_init(struct phy *phy) if (mphy->bypass_pipe_rst) mt7621_bypass_pipe_rst(mphy); - mt7621_set_phy_for_ssc(mphy); - - return 0; + return mt7621_set_phy_for_ssc(mphy); } static int mt7621_pci_phy_power_on(struct phy *phy) @@ -324,6 +325,12 @@ static int mt7621_pci_phy_probe(struct platform_device *pdev) return PTR_ERR(phy->phy); } + phy->sys_clk = devm_clk_get(dev, "sys_clk"); + if (IS_ERR(phy->sys_clk)) { + dev_err(dev, "failed to get phy clock\n"); + return PTR_ERR(phy->sys_clk); + } + phy_set_drvdata(phy->phy, phy); provider = devm_of_phy_provider_register(dev, mt7621_pcie_phy_of_xlate); From patchwork Thu May 6 11:15:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12242025 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,URIBL_BLOCKED, 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 4DEB4C433B4 for ; Thu, 6 May 2021 11:17:40 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 959A561157 for ; Thu, 6 May 2021 11:17:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 959A561157 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-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=PdpuTlviHGssm9LdQnnkO1fTgrIHmbExW/8CnnFUd80=; b=JY48TXziE7FUp9hzt3gv10hqj X/hzeh5+p2+H1VyJ7QZHydCq3NssPf2R1T48pZ4IGAnvFjTV0E1yLaxTSyHjtBQZtIlkutOP9yJ4J cLCNrTWz5310jcqPABLGlEMpDHagtuokikd8euVmMtuJDFkMP8vpYM+LxjpO33z+7N2aIk/4jt3Km 2xbVtr4+azYh3eMTCsW/abNemE/cV+IHzWIkobqy+4Dd6mZbGTo+dMvP2Kk+obq4FKe1Op49ihBns S2uHhZW6pIsjhu+PyhMEcyiXBa7jwCo5UJuhm8nCpvFWAnoWtTM9R/FjJVcnOA3Kcx1SpWre60+AB jvXs+GmSA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lec0f-0046VB-Tu; Thu, 06 May 2021 11:17:37 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebyp-0046Dj-FJ for linux-phy@desiato.infradead.org; Thu, 06 May 2021 11:15:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=rnhsZglV9Tim8CW0KmXYUH85PSzSV/y0PNcnH/Ygu/E=; b=gWc764jeoOhixNQ9x43O48WSOY AZJOl8C7lsi+ovz/32y7IpVWuoVVkObOuxjuqG52D53nOXJcIl9Z+jiOevTIgYJUSHf019B3MJOMw QvlnaN9o14MYKf9TJMLgeacGGlvNNspx5m0LDQ+e2MXlIfehL3XSYp99jyXZTQbOp1HW+dDoUkDMN 0lqVEO1TJ7TPJQ/247oDc9mbGptteqU5FJO16yxPaBtmHtEoN4pFfNtl/npz/fe1h8/v4s1SploWp h3X3VNxqEG4yud9nqRpDF5A0BgVPAAhDiOml4mXd00yfE7rx1CnsggN0cZK1a8U2xuO9j7lE5fz40 koyAWKUg==; Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebyl-005yh9-VL for linux-phy@lists.infradead.org; Thu, 06 May 2021 11:15:42 +0000 Received: by mail-wr1-x430.google.com with SMTP id s8so5172265wrw.10 for ; Thu, 06 May 2021 04:15:39 -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=rnhsZglV9Tim8CW0KmXYUH85PSzSV/y0PNcnH/Ygu/E=; b=QuoDQQzU54P/pO1hushKfsM9IASTAvM9x+K+B0FAT5zQxytbkZGXZmxdCZKNPEHc36 1TBcfDQ+RGmBzGwrk7XvaZzpGq7fakoOOrV+D3d06lYHlYOyoGT/S7Bvbks9WHLOYdH9 x/0F5Go06xpX9odxmDnVHsrV88rbEDfzWnqkR29V+u8+Wmyoxx8vUkeuMMslGJWRuSCo PgY9H9tUVflMZRENVAmmUjFmUJU7KvbZlnOLSc/tIjgy3++rTrNyovAV/9GrgoJWcKna H+XMCqKDv/5s9jt/v5LJ+UiltxO5s1u5sQBGuZagFxA2aiwM2zYNcQ1Yo4/Qs9llO7wH TVzw== 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=rnhsZglV9Tim8CW0KmXYUH85PSzSV/y0PNcnH/Ygu/E=; b=VOOcHp/dYF3Ko3vE8PR9zmLAV/gHWb7GYiPrrmV2TDiEscf+/8F1Dwxb5YofJ+eDwu rVPZz5CQCdW+RVtIIyNRumIl9iTGaZUSOmu7TCDUd4n3/D1yacEsHQ4bXPiAfLgDwrjJ l4zcivD8N9TslfbmhUUtd7GL0ldJRD20dKWNsWd1boawXSDzxYc5m4VqUHsuuSAWHQpD xQ0iIDTvlElSUs5S9Ua8xfY1DsPsQQKlVvtYHfumfXKKJSiVVSs3a4ESIS+qhoc0mi+P rs1KeZ2w7iI7Z1pEhUUHzshfJgdj7UbuZuK9PN/duaRgDSTfXdO/3EBifL1j0Xl7Fg78 ltUQ== X-Gm-Message-State: AOAM532hEwMcP+wIqscTlM+bIx1fjPytf8fDsW9TTboz04lbXiQWqG5A DpuJGoQ8QWwP8+PS7qw5Jxk= X-Google-Smtp-Source: ABdhPJzH20Vd2ChccpIwWV5inlVmnET2Cb9+hDPcI+6QZIxtgU6qxDS6dx2kxXTSYJMUiQsnwdSzTw== X-Received: by 2002:a5d:6291:: with SMTP id k17mr4619928wru.247.1620299738265; Thu, 06 May 2021 04:15:38 -0700 (PDT) Received: from localhost.localdomain (231.red-83-51-243.dynamicip.rima-tde.net. [83.51.243.231]) by smtp.gmail.com with ESMTPSA id u5sm3642433wrt.38.2021.05.06.04.15.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 May 2021 04:15:37 -0700 (PDT) From: Sergio Paracuellos To: vkoul@kernel.org Cc: linux-phy@lists.infradead.org, kishon@ti.com, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, gregkh@linuxfoundation.org, neil@brown.name, ilya.lipnitskiy@gmail.com Subject: [PATCH 4/5] phy: ralink: Kconfig: enable COMPILE_TEST on mt7621-pci-phy driver Date: Thu, 6 May 2021 13:15:30 +0200 Message-Id: <20210506111531.21978-5-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210506111531.21978-1-sergio.paracuellos@gmail.com> References: <20210506111531.21978-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_041540_030804_089174C9 X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org After use the clock apis and avoid custom architecture code this driver can properly be enabled for COMPILE_TEST. Signed-off-by: Sergio Paracuellos Reported-by: kernel test robot --- drivers/phy/ralink/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/ralink/Kconfig b/drivers/phy/ralink/Kconfig index ecc309ba9fee..c2373b30b8a6 100644 --- a/drivers/phy/ralink/Kconfig +++ b/drivers/phy/ralink/Kconfig @@ -4,7 +4,7 @@ # config PHY_MT7621_PCI tristate "MediaTek MT7621 PCI PHY Driver" - depends on RALINK && OF + depends on (RALINK && OF) || COMPILE_TEST select GENERIC_PHY select REGMAP_MMIO help From patchwork Thu May 6 11:15:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Paracuellos X-Patchwork-Id: 12242029 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,URIBL_BLOCKED, 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 4BDB4C43461 for ; Thu, 6 May 2021 11:17:41 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 9F81661185 for ; Thu, 6 May 2021 11:17:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F81661185 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-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=y+RqqH9kqKHpzC+unYGARMTz/snWKrGRylcZ7M5lZ4Y=; b=TzyqJPlBuPnQf2NmrBSoHAMi3 ToCYdFRxryXu5fleIzCpjGWwef36NpfMib4x7MWoBo04PiAk4NcR9GAdvz/BzjOtfa4anfaZqWIFc y85hKHq9YeE+HoFQTS/bto1SVvpxEVO8SgZ0u/XKqNPBmW24QOsmn4oWWjeo7fPOfcl4IVPWfpkE/ M3S9372LknanA3eqJQWMHKi/VOwL+f3s8buWXgFkqXd5gFSo4/KeR2Uyf33MOepgl5h7Es434/+Fm nyV1bCvCaHgsBsThRsTux0+w1BKlVFM1s1XplOjFCx0EuYnYeC/T9IQ4ywTQA5cCy+XcYfUrNFAbA oudSI6uwQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lec0h-0046VQ-1G; Thu, 06 May 2021 11:17:39 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebyq-0046Dm-JZ for linux-phy@desiato.infradead.org; Thu, 06 May 2021 11:15:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=MT2OIJc0hWlPnCiaadINGKimv/o5gd+Xz7S2c7tjZ5A=; b=3oYgZuXaU7YQkFmzk5rpEcQDJs tYcExwFnPWygrackoo5XtMBZItOilVk8ttb6WaV0KIaa5bEp0aD6GEGuayux7cKYaFsPtogtTEECc qil/9ssltXBUdNi15e62nIrtVjaYPj67txEu4N4GBJFSbqoEDtEhdAmpzk3E+/J2CQPyJKzq5g2pm HpyU9+lMdpWQdr+nIge1gbqZznpTwNuwz6S74Lqtoe8shFWKBahAEhWOq4YHVVDcWv2j+bxh7jAmt DrLAvyDvI88a/yDUm5qwmHXCoNdDP7Ti5cPp2yIcRox+5UbjrtiOiyfVxHwcgos7682sKO+5jGbgq JXlxe86A==; Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lebym-005yhq-U2 for linux-phy@lists.infradead.org; Thu, 06 May 2021 11:15:43 +0000 Received: by mail-wr1-x436.google.com with SMTP id a4so5183178wrr.2 for ; Thu, 06 May 2021 04:15:40 -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=MT2OIJc0hWlPnCiaadINGKimv/o5gd+Xz7S2c7tjZ5A=; b=h2C/opMO/xlErlLNdiKWB3MBoV9Axf3M2fUjM5MeerPmbEYvsRMkdruuYJ+Us0E5yq FT/fa11B721XvsrdmV6OvnjhXN/xlJV5b2XuhiTGHANyvmiejdl8nMKH58WacAG9RTRz SwtigXWJKmFu+uwaQFVuMYeshCZgBeEdpYhfMP183k7c8uyMcXLS1uKBUpUPT1FoqJcL A/muttqnqY2WM+XULu4FuRtd6y2UXI9udvDwYHZAGYunuKQnbr7toKT2EMyT6wSZXGj4 0SThp8n/d6QywFcL8KaXTmFex/ziy1EpTG8pHgBvVtPTeJSpBtbsCmOirP+4mpdZ0Irc ydNA== 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=MT2OIJc0hWlPnCiaadINGKimv/o5gd+Xz7S2c7tjZ5A=; b=L3vQ1A0FIPPuioqSp5EZKJDHtO0xg82yUONPrVXPdKZlKYClZ9hdTPD2KaU0QLZSqi v6ApoK+Cd2KQG6czQVNayag8ZK8Kx+0WLGTdn9lACUyILT7dA4NPn7a9QeaJ1WKlwOU0 i8xCu+/EnYVXhjmGSDNZNy8xvYwx5Nvj/cS2eVkxWia/+dpgJeFa2vGaxwpyvoeKdQI1 jn1FeyxGyCnFQlurEe5uU4NCF7pDViex3vbN+bBgAJow9L5eTZDU1IPf+T49rWq12hCB cQAwEOfO4sO02g+ZQWtsqP3A6828DmOLoYap+ojv6FCmZYkBuG+JGMsR1tczKqIZ6Lr0 n65Q== X-Gm-Message-State: AOAM5327QA9m71qEBvnC0+I9EPn9hftkoZwfvBP1c1Il6pEhV0XcB/bw JoqhBPhGoszdH70BJ/uIS+g= X-Google-Smtp-Source: ABdhPJzGyRIuyk5j7KRK+KqSfoclECQr1Gfb2VaxcdMsLESXtKRSzk91U979iL7Z8FNB3REDhwBNRA== X-Received: by 2002:adf:ec4f:: with SMTP id w15mr4479506wrn.122.1620299739235; Thu, 06 May 2021 04:15:39 -0700 (PDT) Received: from localhost.localdomain (231.red-83-51-243.dynamicip.rima-tde.net. [83.51.243.231]) by smtp.gmail.com with ESMTPSA id u5sm3642433wrt.38.2021.05.06.04.15.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 May 2021 04:15:38 -0700 (PDT) From: Sergio Paracuellos To: vkoul@kernel.org Cc: linux-phy@lists.infradead.org, kishon@ti.com, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, gregkh@linuxfoundation.org, neil@brown.name, ilya.lipnitskiy@gmail.com Subject: [PATCH 5/5] phy: ralink: Kconfig: convert mt7621-pci-phy into 'bool' Date: Thu, 6 May 2021 13:15:31 +0200 Message-Id: <20210506111531.21978-6-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210506111531.21978-1-sergio.paracuellos@gmail.com> References: <20210506111531.21978-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_041540_988662_C6F8DECB X-CRM114-Status: GOOD ( 10.96 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Make dependant on PCI_MT7621 configuration option and mark this pci phy configuration as bool which has more sense. Signed-off-by: Sergio Paracuellos --- drivers/phy/ralink/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/ralink/Kconfig b/drivers/phy/ralink/Kconfig index c2373b30b8a6..ed0c71eff2c4 100644 --- a/drivers/phy/ralink/Kconfig +++ b/drivers/phy/ralink/Kconfig @@ -3,8 +3,8 @@ # PHY drivers for Ralink platforms. # config PHY_MT7621_PCI - tristate "MediaTek MT7621 PCI PHY Driver" - depends on (RALINK && OF) || COMPILE_TEST + bool "MediaTek MT7621 PCI PHY Driver" + depends on (RALINK && OF && PCI_MT7621) || COMPILE_TEST select GENERIC_PHY select REGMAP_MMIO help