{"id":829993,"url":"http://patchwork.ozlabs.org/api/1.2/covers/829993/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/cover/20171024175714.15840-1-clabbe.montjoie@gmail.com/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/1.2/projects/7/?format=json","name":"Linux network development","link_name":"netdev","list_id":"netdev.vger.kernel.org","list_email":"netdev@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20171024175714.15840-1-clabbe.montjoie@gmail.com>","list_archive_url":null,"date":"2017-10-24T17:57:04","name":"[v9,00/10] net: stmmac: dwmac-sun8i: Handle integrated PHY","submitter":{"id":64152,"url":"http://patchwork.ozlabs.org/api/1.2/people/64152/?format=json","name":"Corentin Labbe","email":"clabbe.montjoie@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/netdev/cover/20171024175714.15840-1-clabbe.montjoie@gmail.com/mbox/","series":[{"id":10031,"url":"http://patchwork.ozlabs.org/api/1.2/series/10031/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=10031","date":"2017-10-24T17:57:06","name":"net: stmmac: dwmac-sun8i: Handle integrated PHY","version":9,"mbox":"http://patchwork.ozlabs.org/series/10031/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/829993/comments/","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"HLB4kqn5\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yM1Ng3mYVz9sxR\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 25 Oct 2017 05:03:47 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751624AbdJXSAq (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 24 Oct 2017 14:00:46 -0400","from mail-wm0-f47.google.com ([74.125.82.47]:51506 \"EHLO\n\tmail-wm0-f47.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751267AbdJXSAo (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 24 Oct 2017 14:00:44 -0400","by mail-wm0-f47.google.com with SMTP id b9so12270887wmh.0;\n\tTue, 24 Oct 2017 11:00:43 -0700 (PDT)","from Red.local (LFbn-MAR-1-580-96.w90-118.abo.wanadoo.fr.\n\t[90.118.159.96]) by smtp.googlemail.com with ESMTPSA id\n\ts18sm818968wrg.87.2017.10.24.11.00.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 24 Oct 2017 11:00:42 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=KXODY7fyjF5lrLjMnrfIcdaL8Zcrvvs/9KKDzCqTapU=;\n\tb=HLB4kqn5xuEZLj/jwyZVVQCZJQ+oFziMlhQzvfYcGUpHqAEcdAjwMp7Gv/t//UkPyt\n\t0YIUsLsxFzybuO35SHWGYHrrbwlY0dBGMYMTYtGWhoK2ObaZ+6GpzCA8MJQwaPAHUdUy\n\t3snop0x9oSnMml6d2kkdGIuzWeuuGh5KUDIxs3c0YbJItsrpwux816/xNLb2OoOk/hbt\n\tm5Sci3IISt7k0piymDiU7Rgql8xQ+Zn6QHFRSdmO/59vd4y9rgIpzJIwOqZ1Gnhc2S/m\n\t4evNpZkulKpPU0VJYEIGGtqveKN/RYFDj0VY/G7aDfecZtvBcodBpBXjHbVWRWFkZf0h\n\tsJRw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=KXODY7fyjF5lrLjMnrfIcdaL8Zcrvvs/9KKDzCqTapU=;\n\tb=WsBes2Y1vG8giz4uHafxYMFXPfIHCQ7rK2MQy+SpMEuMbFGr8r3YarT/QZ0T3iwDg3\n\t5VoTe2eY3ezUDNRK0iqnuSSH54rZjSaf1gObNDKNsOArwjpnnvNmXWft8ejZRN7s6RrG\n\tJybq6Avcz8hTV66bNAaXQdTkmXuoPxzkwu6/2O314PaC/sylCh0iTeXejrEDOa0p568w\n\tL+Mvfzxf98zaisZeSfdFm4FsuMrt31sc/7xIIu7zZGhtUQ0FgTdFBVmENLb0+OqLANTJ\n\tgrReGOglNvrE0NoNFsJirmCyXtGMND2PKdU114BICozTuaslCN9ulPtc91NlCnQgqt/c\n\tDsSQ==","X-Gm-Message-State":"AMCzsaWmFOpU9m7BdyRrxKqElj651y1Nl1vzqNCaUJoOo7J8iI/RW1xc\n\tsampxpZbmIVe5QZFuj2iIxk=","X-Google-Smtp-Source":"ABhQp+RhUQzK3kHXcFpw+8AyCcd/b69OcxzbjIWQjSI2lV+Nu7ONT9CCrQOvYsSJKSOXw3QR+KLzOQ==","X-Received":"by 10.28.60.8 with SMTP id j8mr7943688wma.92.1508868043239;\n\tTue, 24 Oct 2017 11:00:43 -0700 (PDT)","From":"Corentin Labbe <clabbe.montjoie@gmail.com>","To":"robh+dt@kernel.org, mark.rutland@arm.com,\n\tmaxime.ripard@free-electrons.com, wens@csie.org,\n\tlinux@armlinux.org.uk, catalin.marinas@arm.com,\n\twill.deacon@arm.com, peppe.cavallaro@st.com,\n\talexandre.torgue@st.com, andrew@lunn.ch, f.fainelli@gmail.com","Cc":"netdev@vger.kernel.org, devicetree@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tCorentin Labbe <clabbe.montjoie@gmail.com>","Subject":"[PATCH v9 00/10] net: stmmac: dwmac-sun8i: Handle integrated PHY","Date":"Tue, 24 Oct 2017 19:57:04 +0200","Message-Id":"<20171024175714.15840-1-clabbe.montjoie@gmail.com>","X-Mailer":"git-send-email 2.13.6","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"Hello\n\nThe current way to find if the PHY is internal is to compare DT phy-mode\nand emac_variant/internal_phy.\nBut it will negate a possible future SoC where an external PHY use the\nsame phy mode than the integrated one.\n\nThis patchs series adds a new way to handle this problem via a mdio-mux.\n\nThe first try was to create a new MDIO mux \"mdio-mux-syscon\".\nmdio-mux-syscon working the same way than mdio-mux-mmioreg with the exception\nthat the register is used via syscon/regmap.\nBut this solution does not work for two reason:\n- changing the MDIO selection need the reset of MAC which cannot be done by the\n        mdio-mux-syscon driver\n- There were driver loading order problem:\n        - mdio-mux-syscon needing that stmmac register the parent MDIO\n        - stmmac needing that child MDIO was registered just after registering parent MDIO\n\nSo we cannot use any external MDIO-mux.\n\nThe final solution was to represent the mdio-mux in MAC node and let the MAC handle all things.\n\nSince DT bits was reverted in 4.13, this patch series include the revert of the revert.\n\nI have let patch splited for easy review. (for seeing what's new)\nBut the final serie could have some patch squashed if someone want.\nLike squashing patch and 1 and 2 (documentation)\n\nThe first 7 patch should go via the sunxi tree, the last three via the net tree.\n\nRegards\n\nChanges since v8:\n- added reference to mdio-mux.txt in documentation\n- removed compatible mdio-mux\n- added mdio-parent-bus\n\nChanges since v7:\n- moved mdio-mux ouf of mdio as asked by Andrew Lunn\n- reordered patchs order\n\nChanges since v6:\n- renamed external mdio to \"external_mdio\"\n- added compatible to mdio-mux and internal-mdio\n- removed usage of phy-is-integrated\n- renamed do_not_scan to compatible_muxes (patch 10)\n- patch 8 9 of v6 are squashed\n\nChanges since v5:\n- reordered patch 1 and 2\n- mdio-mux node is now a mdio's child\n- added patch 11 for removing unnecessary scan of mdio-mux\n\nChanges since v4:\n- Update documentation for new bindings\n- Added 4 patchs for bring back reverted stuff of 4.13\n- dwmac-sun8i now handle mdio-mux\n- MDIO use now compatible = \"snps,dwmac-mdio\";\n\nChanges since v3:\n- Added a patch for handling fixed-link\n- Updated documentation\n\nChanges since v2:\n- Add a MDIO mux for creating distinction between integrated and external MDIO.\n- phy-is-integrated is not set in dtsi.\n\nChanges since v1:\n- Dropped phy-is-integrated documentation patch since another same patch was already merged\n- Moved phy-is-integrated from SoC dtsi to final board DT.\n\nAcked-by: Florian Fainelli <f.fainelli@gmail.com>\n\nCorentin Labbe (10):\n  dt-bindings: net: Restore sun8i dwmac binding\n  dt-bindings: net: dwmac-sun8i: update documentation about integrated\n    PHY\n  arm: dts: sunxi: h3/h5: Restore EMAC changes\n  arm: dts: sunxi: h3/h5: represent the mdio switch used by\n    sun8i-h3-emac\n  arm: dts: sunxi: Restore EMAC changes (boards)\n  arm64: dts: allwinner: Restore EMAC changes\n  arm64: dts: allwinner: add snps,dwmac-mdio compatible to emac/mdio\n  net: stmmac: snps,dwmac-mdio MDIOs are automatically registered\n  net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs\n  net: stmmac: sun8i: Restore the compatibles\n\n .../devicetree/bindings/net/dwmac-sun8i.txt        | 205 ++++++++++++\n arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts  |   9 +\n arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts    |  19 ++\n arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts      |  19 ++\n arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts          |   7 +\n arch/arm/boot/dts/sun8i-h3-orangepi-2.dts          |   8 +\n arch/arm/boot/dts/sun8i-h3-orangepi-one.dts        |   8 +\n arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts    |   5 +\n arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts         |   8 +\n arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts       |  22 ++\n arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts     |  16 +\n arch/arm/boot/dts/sunxi-h3-h5.dtsi                 |  48 +++\n .../boot/dts/allwinner/sun50i-a64-bananapi-m64.dts |  16 +\n .../boot/dts/allwinner/sun50i-a64-pine64-plus.dts  |  15 +\n .../arm64/boot/dts/allwinner/sun50i-a64-pine64.dts |  17 +\n .../dts/allwinner/sun50i-a64-sopine-baseboard.dts  |  16 +\n arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi      |  21 ++\n .../boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts   |  17 +\n .../boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts  |  17 +\n .../dts/allwinner/sun50i-h5-orangepi-prime.dts     |  17 +\n drivers/net/ethernet/stmicro/stmmac/Kconfig        |   1 +\n drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c  | 361 +++++++++++++--------\n .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |   4 -\n 23 files changed, 742 insertions(+), 134 deletions(-)\n create mode 100644 Documentation/devicetree/bindings/net/dwmac-sun8i.txt"}