Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2071566pxb; Sat, 21 Nov 2020 07:53:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFR4VZWoUhbjImz1BqwLftUanS+eaYFysjJznEV+fIHv4bfuEfGl2LE47LxfJmV9gC4C6q X-Received: by 2002:a17:906:178b:: with SMTP id t11mr28408389eje.152.1605974011929; Sat, 21 Nov 2020 07:53:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605974011; cv=none; d=google.com; s=arc-20160816; b=TsoWyJjvF1JOnrAI8Yo8fhSsp9u3t4Rea4oVjth0/yPkbk9unvhYn8DQt2Pflyvxy2 FTchKTqCgvaTt6CW4WDVj4sPrTJxvSTSjN5u50dF9tWzTrNQN6XRfHzNoK3e5gfuqDFa I0NzGhCQ5gpxfzeK3wS3FYQVs9LaexQAK5OZ7B+VXoJt0KEbsX7ngsdbmAS1A/gAz1nA mlBcwW/Y59N4VQY3lD2qbkM1pT1SA+AsIjeJ5+bxK47hOut7ynAUH8Kyl69LXHfPJxur QqliwUvj3tCAvMvLsbn4y3rb4qDugRD9MYNKvs+o3jO/ROuN+vfVik77yBaqinEgLra7 7Ykg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Jd3/1hRfxc7Y0whxq1qc3RnNgcKPiRRQEOenbTFn7o8=; b=RkF866FZcEPiGLrCewjtK6dDpeTq9f2MJW1vjLpcxER6FX5zkOudn39mUlYdXeRFEc liDhfb6rGpoGWDEZMyGA1742fLLy+4nWTsJaxgBCT9+Qqwbr/E5+pjQqK6yH0EjCKgDM +EqPueRCoypoq6TNNgfzbOR0Ao7XwpIBscGKXlf29UKZmbufkZ8zjYUVXWcB0zyu0Q5b wxF1JpjBSsdwdb5nVMRmhU2rkaBxGLbgoFZWoEP0fYkGStBdmmBRvYbmO8xjrO9YU0sl yU2ZXsPM2/jMzj9PJYOf2Lm00z80ZCzPHM+fY4nXPnWtbEC/+tjS9xgCp0/a9sv5WjRw s3TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UaRRq3qN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si3824483edr.229.2020.11.21.07.53.08; Sat, 21 Nov 2020 07:53:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UaRRq3qN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727983AbgKUPum (ORCPT + 99 others); Sat, 21 Nov 2020 10:50:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727882AbgKUPul (ORCPT ); Sat, 21 Nov 2020 10:50:41 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 902A9C0613CF; Sat, 21 Nov 2020 07:50:41 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id k2so14033119wrx.2; Sat, 21 Nov 2020 07:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Jd3/1hRfxc7Y0whxq1qc3RnNgcKPiRRQEOenbTFn7o8=; b=UaRRq3qNj2P+/jG9H9x6ZMHkVMcQDKG3Fb5afOhielDlXzdzwYtEv7jaYWvNDo9oBE 632GUZHFZF6M2H4CvrYS1VwIqx7UNhyjMziiNaarLVJV9o0p2AshUdiuW+hz2tEF1F7j bkDYYD95K7wKUCKpjs7Qf1NGxvsrDKuWPtUsiWibv5SKU6u6ot2Ka/7buPaq9CVPVF/7 0JJjf0bl4y3ogkjJy4CfL6w7opgBMSHY+WFv8w8EDw3VnTpXRP43C2yBa3bzQ0wPiI1T Jab0Jk/A4frfGqsYcxxYk+mgb/pHqC2aXBWjHV+Pynl6voetj/Ie9b3o8ikWAFBL960V 5pag== 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:mime-version :content-transfer-encoding; bh=Jd3/1hRfxc7Y0whxq1qc3RnNgcKPiRRQEOenbTFn7o8=; b=eoK3WdYgAuE+DUfC+e59ZY8wx9rl/3I1A7tfOdVSeH4ozxCETKlqXYklpotRvhsFdr dAEunYq1a+1h2IUq83J3HJ9pxHpm8rmcPlST/YTm7yOFX5CgYT3r3FeTpWYJB2FYlJ3t svlLIJCgvYaijLYTHh6b61WqEpPPl2gNwU9cg3HfoKIHer+Hh/dkcvM9N2Jh/QLfWT3Y oqsRRwigr85CTEgwZCLO+cBYypQLI+ww7p1dO/L+EfxVZ07H5S1KbHWQRTrLm044HVG+ EZQmH1cktU0ARGFT2XsXJn3W+v4j2XGaThkCLqQbr2Bg4rUEio8qJi9L1yScVEj+FQO4 nQ+w== X-Gm-Message-State: AOAM53348ga3u+hAFLoarM1cmS7ssxBIY1qrNhaop91kNNh0Cu/+f9ht L61LTuWRvLLZfLOT5dnOBWc= X-Received: by 2002:a5d:6852:: with SMTP id o18mr21570046wrw.336.1605973840346; Sat, 21 Nov 2020 07:50:40 -0800 (PST) Received: from localhost.localdomain (161.red-83-46-194.dynamicip.rima-tde.net. [83.46.194.161]) by smtp.gmail.com with ESMTPSA id n128sm7959598wmb.46.2020.11.21.07.50.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Nov 2020 07:50:39 -0800 (PST) From: Sergio Paracuellos To: vkoul@kernel.org Cc: robh+dt@kernel.org, kishon@ti.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, devel@driverdev.osuosl.org, neil@brown.name Subject: [PATCH v6 0/4] MT7621 PCIe PHY Date: Sat, 21 Nov 2020 16:50:33 +0100 Message-Id: <20201121155037.21354-1-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds support for the PCIe PHY found in the Mediatek MT7621 SoC. There is also a 'mt7621-pci' driver which is the controller part which is still in staging and is a client of this phy. Both drivers have been tested together in a gnubee1 board. This series are rebased on the top of linux-phy: commit 768a711e2d4b ("phy: samsung: phy-exynos-pcie: fix typo 'tunning'") Changes in v6: - Change definition name to XTAL_MASK to fix its use in one line. - Fix XTAL_MASK mask value after use it with 'FIELD_GET'. - Add comment in 'mt7621_phy_rmw' about why 'regmap_write_bits' cannot be used. - Rebase series on the top of 'next' branch of 'linux-phy' tree. Changes in v5: - PATCH 1/4: Recollect Rob's Reviewed-by of bindings. - PATCH 4/4: Recollect Greg's Acked-by for removing stuff from staging area. - Use 'devm_platform_ioremap_resource' instead of using 'platform_get_resource' and 'devm_ioremap_resource'. - Make Vinod's review comments changes in [0]: * Use FIELD_GET and FIELD_PREP apis and avoid multiple *_VAL and *_SHIFT custom definitions. * Remove phy-read and phy-write internal functions and directly call regmap_read and regmap_write in 'mt7621_phy_rmw'. * Change some traces from info to debug log level. * Note that I have maintained 'mt7621_phy_rmw' instead of use 'regmap_update_bits'. This is because in order to get a reliable boot registers must be written event the contained value in that register is the same. I have preferred doing in this way instead of using 'regmap_update_bits_base' passing 'false' for async and 'true' for the force write. If this way of using 'regmap_update_bits_base' is preferred just let me know. Changes in v4: - Bindings moved from txt to yaml so previous Rob's Reviewed-by is not in the new patch with the yaml file. - 'phy-cells' property means now if phy is dual-ported. - Avoid custom 'xlate' function and properly set registers when the phy is dual ported. - Add use of 'builtin_platform_driver'. - Added a patch including myself as maintainer in the MAINTAINERS file. - Add a patch removing patch from staging to make easier the complete inclusion and avoid possible problems might appear in 'linux-next' if the series are included. Changes in v3: - Recollect Rob's Reviewed-by of bindings. - Make Kishon Vijay suggested changes in v2: (See https://lkml.org/lkml/2019/4/17/53) - Kconfig: * Add depends on COMPILE_TEST * Select REGMAP_MMIO - Make use of 'soc_device_attribute' and 'soc_device_match' - Use regmap mmio API instead of directly 'readl' and 'writel'. - Use 'platform_get_resource' instead of 'of_address_to_resource'. Changes in v2: - Reorder patches to get bindings first in the series. - Don't use child nodes in the device tree. Use #phy-cells=1 instead. - Update driver code with new 'xlate' function for the new device tree. - Minor changes in driver's macros changing some spaces to tabs. Thanks in advance for your time. Best regards, Sergio Paracuellos [0]: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2020-November/148864.html Sergio Paracuellos (4): dt-bindings: phy: Add binding for Mediatek MT7621 PCIe PHY phy: ralink: Add PHY driver for MT7621 PCIe PHY MAINTAINERS: add MT7621 PHY PCI maintainer staging: mt7621-pci-phy: remove driver from staging .../phy}/mediatek,mt7621-pci-phy.yaml | 2 +- MAINTAINERS | 6 + drivers/phy/ralink/Kconfig | 8 ++ drivers/phy/ralink/Makefile | 1 + .../ralink/phy-mt7621-pci.c} | 115 +++++++----------- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/mt7621-pci-phy/Kconfig | 8 -- drivers/staging/mt7621-pci-phy/Makefile | 2 - drivers/staging/mt7621-pci-phy/TODO | 4 - 10 files changed, 63 insertions(+), 86 deletions(-) rename {drivers/staging/mt7621-pci-phy => Documentation/devicetree/bindings/phy}/mediatek,mt7621-pci-phy.yaml (92%) rename drivers/{staging/mt7621-pci-phy/pci-mt7621-phy.c => phy/ralink/phy-mt7621-pci.c} (76%) delete mode 100644 drivers/staging/mt7621-pci-phy/Kconfig delete mode 100644 drivers/staging/mt7621-pci-phy/Makefile delete mode 100644 drivers/staging/mt7621-pci-phy/TODO -- 2.25.1