From patchwork Thu Jun 18 12:11:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 198862 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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=no 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 AB600C433DF for ; Thu, 18 Jun 2020 12:12:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8CD2E2085B for ; Thu, 18 Jun 2020 12:12:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729511AbgFRMLu (ORCPT ); Thu, 18 Jun 2020 08:11:50 -0400 Received: from gloria.sntech.de ([185.11.138.130]:53398 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729016AbgFRMLt (ORCPT ); Thu, 18 Jun 2020 08:11:49 -0400 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jltOP-0007op-Hd; Thu, 18 Jun 2020 14:11:41 +0200 From: Heiko Stuebner To: davem@davemloft.net, kuba@kernel.org Cc: robh+dt@kernel.org, andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com, linux@armlinux.org.uk, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, heiko@sntech.de, christoph.muellner@theobroma-systems.com Subject: [PATCH v5 0/3] add clkout support to mscc phys Date: Thu, 18 Jun 2020 14:11:36 +0200 Message-Id: <20200618121139.1703762-1-heiko@sntech.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The main part of this series is adding handling of the clkout controls some of the mscc phys have and while at it Andrew asked for some of the duplicated probe functionality to be factored out into a common function. A working config on rockchip/rk3368-lion for example now looks like: &gmac { status = "okay"; mdio { compatible = "snps,dwmac-mdio"; #address-cells = <1>; #size-cells = <0>; phy0: phy@0 { compatible = "ethernet-phy-id0007.0570"; reg = <0>; assigned-clocks = <&phy0>, <&cru SCLK_MAC>; assigned-clock-rates = <125000000>, <125000000>; assigned-clock-parents = <0>, <&phy0>; clock-output-names = "ext_gmac"; #clock-cells = <0>; vsc8531,edge-slowdown = <7>; vsc8531,led-0-mode = <1>; vsc8531,led-1-mode = <2>; }; }; }; changes in v5: - added Andrew's Rb for patch 1 - modified clkout handling to be a clock-provider to fit into the existing clock structures changes in v4: - fix missing variable initialization in one probe function changes in v3: - adapt to 5.8 merge-window results - introduce a more generic enet-phy-property instead of using a vsc8531,* one - suggested by Andrew changes in v2: - new probe factoring patch as suggested by Andrew Heiko Stuebner (3): net: phy: mscc: move shared probe code into a helper dt-bindings: net: mscc-vsc8531: add optional clock properties net: phy: mscc: handle the clkout control on some phy variants .../bindings/net/mscc-phy-vsc8531.txt | 2 + drivers/net/phy/mscc/mscc.h | 13 + drivers/net/phy/mscc/mscc_main.c | 306 ++++++++++++++---- 3 files changed, 250 insertions(+), 71 deletions(-)