From patchwork Thu Aug 2 00:53:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Parameswaran X-Patchwork-Id: 10553159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3850D13BB for ; Thu, 2 Aug 2018 00:54:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 246732B11A for ; Thu, 2 Aug 2018 00:54:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 183D02B295; Thu, 2 Aug 2018 00:54:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A96A32B11A for ; Thu, 2 Aug 2018 00:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=sOQ9kWUIRdhJ4r2HHRAIAh8Pm45bFekdVLadel5zrpk=; b=I6t mKdQz5E0lhqUWfuu1Lobhbb0JpOxEK0qkZwEWUkoz8cezTUs8coFKwJILWGdiQDpZrywI9Vixn/22 6bYWePwT0/NoKfSzsgN9HeujFfHoluvUHoWArbUAUVikt6Klc8BwAQCzRdlJY7gQTSz5+zta67iej hStFTJalgko7xb6x29ByKsb30AgiH8GyJF6iQo1ezRIasEyDbuD/6OBwZtQsGMAx/VI3ifPKHhibm l7RykG1vwf4wmG8Lo8Nx5kvF6XRlm4IHdmfgfsy9xbaqAAWK8BaSF/HY4dHg4X3V7nIfyvHIcLpqA qXX/PSxz283gNRCDC6fYiWv8gImKhZg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fl1sa-0004ty-NF; Thu, 02 Aug 2018 00:54:12 +0000 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fl1sE-0004ON-5d for linux-arm-kernel@lists.infradead.org; Thu, 02 Aug 2018 00:53:53 +0000 Received: by mail-qt0-x241.google.com with SMTP id m13-v6so570504qth.1 for ; Wed, 01 Aug 2018 17:53:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=EaMsRMnPbdN9XzgYzXY6VXWamivpWZRby7r92p5UiuU=; b=ab07OqSN006xvtkPRBGIMAAgoelraGLnEJnnHEmXm7aLn1CnA6uTepY9ihKe1UAYe6 1bvYBYzHuSpansOz4t/wcPv/2la+/aVdUZxyQU9qEReogCviGhyC+fdyAsPxoto1Wrgg N2sufjzts08JzNdhn4S7671fIeVgkkQnyf220= 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; bh=EaMsRMnPbdN9XzgYzXY6VXWamivpWZRby7r92p5UiuU=; b=k8s0NzXDE940PEuSI0kWJLAfrzhcDwabtIUeXlCzyOmSOzx1wCXiuUrfVEwI0bZUKl mUgNnYb5npyojnGeiOa4HLmnw9N0STpKtrEXyQzPJSgEpCx6FQuIN+tG7xD4bWpK5MOg teYpCHuqyhOMKgRe6ykdiQ+YYGZITua/e3Lto3BbwvOUZQ2cgNEYOYdTkxQpMrEQSz+Q N8Xo7kRUBgRUnX/Ap2YerMWR3hq/FGikcb0ajsp2WJ5LXE91z+0jJXAQMQgMMYrNxBA4 LLj6QHbmnusOV3ey4mtzBOyLP9VNMVY18Gh2pkezoOHjCq7vlXJSiVkpLL2AIOK+waWx AWDQ== X-Gm-Message-State: AOUpUlFJskSMXbuumb+xUiUeolx3OP7suwqKgQoIDFH+f+fl6Pqa+AR8 oyAl34Gw4R32TXjbOliM7E+zPw== X-Google-Smtp-Source: AAOMgpcOEuabOXnFXswqUIStlgufFbjc2ie9+uy03xiVlUE64lajtn4bRHg6s0LVrZhqmtCOAqsJKw== X-Received: by 2002:ac8:35c8:: with SMTP id l8-v6mr601444qtb.409.1533171217469; Wed, 01 Aug 2018 17:53:37 -0700 (PDT) Received: from lbrmn-lnxub86.ric.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id e81-v6sm325116qka.3.2018.08.01.17.53.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Aug 2018 17:53:36 -0700 (PDT) From: Arun Parameswaran To: "David S. Miller" , Florian Fainelli , Andrew Lunn , Rob Herring , Mark Rutland , Ray Jui , Scott Branden , Catalin Marinas , Will Deacon Subject: [PATCH v4 0/8] Add clock config and pm support to bcm iProc mdio mux Date: Wed, 1 Aug 2018 17:53:45 -0700 Message-Id: <1533171233-14557-1-git-send-email-arun.parameswaran@broadcom.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180801_175350_218143_0A6536BA X-CRM114-Status: GOOD ( 22.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, Arun Parameswaran , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, The patchset is based on David Miller's "net-next" repo. The patchset extends the Broadcom iProc mdio mux to add support for suspend/resume and the ability to configure the internal clock divider. The patchset also sets the scan control register to disable external master access. The base address of the mdio-mux-bcm-iproc is modified to point to the start of the mdio block's address space, to be able to access all the mdio's registers. The missing registers are required to configure the internal clock divider registers in some of the Broadcom SoC's. Changes from v3: - Removed 'platform_set_drvdata(pdev, NULL)' call (in patch 5/8) - Fixed the return code handling for the devm_clk_get() call (in patch 7/8) - Added Reviewed-by tag to Patch 8/8 Changes from v2: - Addressed Andrew's comments: - Moved to using devm_mdiobus_alloc. Added this as a separate patch. - Changed to reverse christmas tree order for variable declaration in the clock patch - Addressed Florian's comments: - Removed null checks for the clock before calling unprepare in both clock and pm patches. - Added check for EPROBE_DEFER when fetching the clock in the clock patch. - The patch to use the devm API has been added before the clock & pm patches. This patch is now patch '5' in the series. - Added reviewed-by tags to commit messages of patches which remain unmodified from v2. - Modified PM patch to use platform_get_drvdata() in suspend/resume API's, similar to the recent fix that went in for the remove() api. Changes from v1: - Addressed Andrew's comments. - Reworked the patches to be based on 'net-next' - Removed 'fixes' from the commit messages, the changes are related to the new features being added. - Maintained backward compatibility to older dt-blob's specifying base addresse with an offset. The correction is applied in the driver and a message is printed to update the dt-blob. - Re-worked and re-ordered the last four patches (4-7). - Added setting of the scan control register as a new patch - Added a call to 'clk_prepare_enable()' in the patch that adds the clock config support, removed the debug message when clock is not passed. - Simplified the pm support patch (removed the array used for the save/restore logic). Thanks Arun Parameswaran (8): dt-bindings: net: Fix Broadcom iProc mdio mux driver base address net: phy: Fix the register offsets in Broadcom iProc mdio mux driver arm64: dts: Fix the base address of the Broadcom iProc mdio mux net: phy: Disable external master access in bcm mdio mux driver net: phy: Use devm api for mdio bus allocation in bcm iproc mdio mux dt-bindings: net: Add clock handle to Broadcom iProc mdio mux net: phy: Add support to configure clock in Broadcom iProc mdio mux net: phy: Add pm support to Broadcom iProc mdio mux driver .../bindings/net/brcm,mdio-mux-iproc.txt | 7 +- arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 4 +- .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 4 +- drivers/net/phy/mdio-mux-bcm-iproc.c | 108 ++++++++++++++++++--- 4 files changed, 106 insertions(+), 17 deletions(-)