Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3998765rdb; Thu, 14 Sep 2023 08:51:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHDSVneeqSV1JQxU4hRwoggrz9Es9X8WFhc1gHSgm8x30rASwAaIJ/VvTxm81EPzzKJgz4 X-Received: by 2002:a05:6a21:19d:b0:14e:9092:4291 with SMTP id le29-20020a056a21019d00b0014e90924291mr8154676pzb.7.1694706685303; Thu, 14 Sep 2023 08:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694706685; cv=none; d=google.com; s=arc-20160816; b=JjFbbmHL2c9kKfWPGoETQUFK1IJPSCWroEDuKpnSRkkO1qcfhWMGq1VotJSmwNh/iS 2pydFlNpNwjxkhTd1XIqz7bp6Ez1X6TE7J7t+NFBanI0gtzP8vYaMEiVrarox+JZ6cbh 32vfy/s9I3qvKBr87GsBDWOIB3ytUU7STwOjoajk1hIdSSXQTTc6vtBjz06QCOMS0mG+ T2/W26FaqhjGueUhLuYdYXCs30kr9iGjxqCHJF4CD4LdtYOkEAL2NgYa29BItytTieMy WZCzwtLGkHrr2MTI0IqLESRF+ciFr027FZYnYpzgd0JE/+oD+p/lHnnBMNPJxdj8D8Sa F3NQ== 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=t+kQMiG2y9xvH6Xiq+UYTxDs8hYtVgDtBvxZVJtfEGc=; fh=ndOZv3Zu9ueR4AZ4UpsSEbZtVlsY1dXunACFdjzNifI=; b=zlX2NI8BatlD6GfLZl3o5DaTiQlmnhYLycdVdRG4h9gqXhZGz/7XbLMNbdFdp0zaCH i4JjJRmBc6MQYJ5iZojgcnb212damPsC1tDpC90rctih7cROoD4LpqW8rVoDFH8ohFXb tUcMaxV5Pmd8gCGCMA3A7iYVPs6z+E4qDc4yAPPEa+5NAIMG6+QuilKFIPCa8z6gTMYD dByOphxP4WOVOMv12ktIW/cXPsHWc4TEdU8p49Vlc1mZfgCByk+eLSrAPfDRUWCpQ/bN VcpqCOkTuz0/h8Tnxo4SFqgGJw95pSWoRvhvDtlIrdoh81I5rWbFzYT0yekZq0NTnuB7 c3AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=kvRR3QtD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s21-20020a63af55000000b005775a4a2961si1825308pgo.657.2023.09.14.08.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 08:51:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=kvRR3QtD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 88A8882F4088; Thu, 14 Sep 2023 04:45:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232442AbjINLpI (ORCPT + 99 others); Thu, 14 Sep 2023 07:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbjINLpH (ORCPT ); Thu, 14 Sep 2023 07:45:07 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 527469B; Thu, 14 Sep 2023 04:45:03 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1c336f5b1ffso7061375ad.2; Thu, 14 Sep 2023 04:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694691902; x=1695296702; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=t+kQMiG2y9xvH6Xiq+UYTxDs8hYtVgDtBvxZVJtfEGc=; b=kvRR3QtDI9AFC0VJ1zlYzrnjA1n1fcJhsWu10HMiKyHKVgUkwSLBqEm0kuvi4DxHuS np54vIN67BfCNV4owzskh7AlLY91bMbJzQAeht51orTRQ5X9QcWZLmSub5ncKzjgbqar rSAJm9S0bLhxMa80P20znXXtthVCTkRVByDj3ushN1V6K9mEt/Okh2oCX3TNw7FEPoQT kMCrP7nA8jw2QikiKUwHiRy3g/lKP6sTWFndiZYozqrAY/AHVps4/OcEzlsg/Gv/p0Xw wcGbYlloNfhZ6jH4pY1sWm325kIjOFRAHiei19XvX9QNv2uFQNCFROx7p2Z3cTmRqBKL SP0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694691902; x=1695296702; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=t+kQMiG2y9xvH6Xiq+UYTxDs8hYtVgDtBvxZVJtfEGc=; b=N7xV3v4Qg+w+e263IqoWFUXOnT3ajnNqAIH0LQS/SQ0wYzMehMH3BQgywOAlPSwcE8 h3hSXQTi2lByOtTHJdbXT0EMm6qglGOFj4k5OObT/I0zMgEwG5vkhpINln2DRKpYIw2s 7Kzqc0tZyr7b1pZcdRVRi9f9iD3MUnAwxYEQRG/OLZxPUnhOkiZyV5k9DwCcjIkwcvAN KRA8bGx8XrD/aVYHtCyHYddZMzjGYKC7dbhAbZ7toraFnxesonVahHpgG7O22r2Po/F9 81CDCRLUFa9ZVyKFeV9unKkiSKZeeZvMUNFSKYW8XQgYiKSb40H+L3qSqgZWr9+Exmm/ DQMQ== X-Gm-Message-State: AOJu0Yw+TCH7gtE3d3Pqfj0CS4jM2qMv0/R/OmebFq6RzH9EiRy355MR yZF9AlOib425CfvXcLObjwo3nNk9JHo= X-Received: by 2002:a17:903:22cd:b0:1c3:52ed:1905 with SMTP id y13-20020a17090322cd00b001c352ed1905mr7039337plg.28.1694691902278; Thu, 14 Sep 2023 04:45:02 -0700 (PDT) Received: from kelvin-ThinkPad-L14-Gen-1.lan ([103.184.129.7]) by smtp.gmail.com with ESMTPSA id h12-20020a170902748c00b001b9cea4e8a2sm1388570pll.293.2023.09.14.04.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 04:45:01 -0700 (PDT) From: Keguang Zhang To: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Thomas Bogendoerfer , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Serge Semin , Keguang Zhang Subject: [PATCH v5 0/3] Move Loongson1 MAC arch-code to the driver dir Date: Thu, 14 Sep 2023 19:44:32 +0800 Message-Id: <20230914114435.481900-1-keguang.zhang@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 04:45:06 -0700 (PDT) In order to convert Loongson1 MAC platform devices to the devicetree nodes, Loongson1 MAC arch-code should be moved to the driver dir. Add dt-binding document and update MAINTAINERS file accordingly. In other words, this patchset is a preparation for converting Loongson1 platform devices to devicetree. Changelog V4 -> V5: Replace stmmac_probe_config_dt() with devm_stmmac_probe_config_dt() Replace stmmac_pltfr_probe() with devm_stmmac_pltfr_probe() Squash patch 4 into patch 2 and 3 V3 -> V4: Add Acked-by tag from Krzysztof Kozlowski Add "|" to description part Amend "phy-mode" property Drop ls1x_dwmac_syscon definition and its instances Drop three redundant fields from the ls1x_dwmac structure Drop the ls1x_dwmac_init() method. Update the dt-binding document entry of Loongson1 Ethernet Some minor improvements V2 -> V3: Split the DT-schema file into loongson,ls1b-gmac.yaml and loongson,ls1c-emac.yaml (suggested by Serge Semin) Change the compatibles to loongson,ls1b-gmac and loongson,ls1c-emac Rename loongson,dwmac-syscon to loongson,ls1-syscon Amend the title Add description Add Reviewed-by tag from Krzysztof Kozlowski Change compatibles back to loongson,ls1b-syscon and loongson,ls1c-syscon Determine the device ID by physical base address(suggested by Serge Semin) Use regmap instead of regmap fields Use syscon_regmap_lookup_by_phandle() Some minor fixes Update the entries of MAINTAINERS V1 -> V2: Leave the Ethernet platform data for now Make the syscon compatibles more specific Fix "clock-names" and "interrupt-names" property Rename the syscon property to "loongson,dwmac-syscon" Drop "phy-handle" and "phy-mode" requirement Revert adding loongson,ls1b-dwmac/loongson,ls1c-dwmac to snps,dwmac.yaml Fix the build errors due to CONFIG_OF being unset Change struct reg_field definitions to const Rename the syscon property to "loongson,dwmac-syscon" Add MII PHY mode for LS1C Improve the commit message Keguang Zhang (3): dt-bindings: mfd: syscon: Add compatibles for Loongson-1 syscon dt-bindings: net: Add Loongson-1 Ethernet Controller net: stmmac: Add glue layer for Loongson-1 SoC .../devicetree/bindings/mfd/syscon.yaml | 2 + .../bindings/net/loongson,ls1b-gmac.yaml | 114 ++++++++++ .../bindings/net/loongson,ls1c-emac.yaml | 113 ++++++++++ MAINTAINERS | 2 + drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + .../ethernet/stmicro/stmmac/dwmac-loongson1.c | 209 ++++++++++++++++++ 7 files changed, 452 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/loongson,ls1b-gmac.yaml create mode 100644 Documentation/devicetree/bindings/net/loongson,ls1c-emac.yaml create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-loongson1.c base-commit: 98897dc735cf6635f0966f76eb0108354168fb15 -- 2.39.2