From patchwork Fri Aug 20 07:47:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 500382 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp1299228jab; Fri, 20 Aug 2021 00:47:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYlZfSzTPm5yFvlWZ+k3NT5GwEMC/CkHZ4zREMJHiKRORI7CcH0UoIqZOkY/C68j7mf97E X-Received: by 2002:a17:906:3a58:: with SMTP id a24mr20092328ejf.109.1629445659361; Fri, 20 Aug 2021 00:47:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629445659; cv=none; d=google.com; s=arc-20160816; b=Py+gyR/pStFSl329s3PqK9AxOB0w5cv+tgFm9ruP6sy3cxAYEo5TNSOdxICzdgSZlv ePMedUkj/RmThNYGg+RmzxwLpknhNYLosM1hzaA7n/A/DbIGZ6zmTbaiYMP4IZ2bshO/ pfsNz7RMOkX7zyaYXjj3nKbQHYK6TQUvd48zbJ4pUGnrpDZjHq0YzPn8VCRGE1d43ohl XH1VK2pcpkNxBqyt2PLV1bfl+PqFQKz7n5+4mrx4H6VKw/nZxbvOGnhH1wwuCmOduuZ/ kCKtwECAbNzkURQus/iK1OoP9dx7eW7s71ID9JqK84iQ2C9O6h/pH9uyAsHqKciyatiE brsA== 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:sender:dkim-signature; bh=NSFv+wO9M2SphOKGJXrg4MsTVB5sz3wlZBsp07YogIU=; b=QenkF5PyPmDnBfOPNXMdO3OGTDBkw91o4RVfqcA73y4FULPlBY8UEKT+/0hjFPIdT6 fVWnZe/eU1GgGuE6jModlhylqoIX8oulBWK6wfudkbrZCG9KgmUc3n6cRq6G2e5vmcPP qJ/4D+rz6TIhjufXwGL+LALr60FN62eXWID35dampKqWTYTqBcNGscPEQnEbsSPz+G+a Q2I69jKA0ix5U+frDdj3Y50q7K5uGIo2q6GGn/VYX5Kw1TYS8rXqgDNnEpMOlON24Us2 56rpKglM8iQu/F3Ha1Xj8AiY/ahPD7xguiE5j/hUv7PZzftq6XZYr1jrjKEyJMGkXPxR DQ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="N/SXYokE"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si5756001edc.355.2021.08.20.00.47.39; Fri, 20 Aug 2021 00:47:39 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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="N/SXYokE"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238664AbhHTHsP (ORCPT + 7 others); Fri, 20 Aug 2021 03:48:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238603AbhHTHsO (ORCPT ); Fri, 20 Aug 2021 03:48:14 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5534CC061575; Fri, 20 Aug 2021 00:47:37 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id mq2-20020a17090b3802b0290178911d298bso6710784pjb.1; Fri, 20 Aug 2021 00:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NSFv+wO9M2SphOKGJXrg4MsTVB5sz3wlZBsp07YogIU=; b=N/SXYokExOcUICCbWuvAoyV2+dmu0DVWioxX/9dtFxrslu9wj8WEVsM+QWMYcyhjxZ VjyZW5HzrmMEkEMHXMURnFHeCDTwG0lV9HnjcL4Hv1ENjtgsJulZyiYQ52vhZLEhhUxX EkSqm9HUsjN9XQlPclx2Sjski6t6uc9MtYNuxp/7VlDvo9Q/QpwbIA+2if9ye24fwg5K SQzC5pNewka4QY/CyLHnzUiXqUH3FMltnNzQbNrRjll8PqaAiTIwp2d8EFkaJbWNm3nP V7ZRf+9ohZmepfTCq0zzIKuEWm3AjWIQSuBZ5O4MxhdPw1Z9ZyD3G4ZSON5SmSPXCTLG 641g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=NSFv+wO9M2SphOKGJXrg4MsTVB5sz3wlZBsp07YogIU=; b=Wo7l/S6rotkPFl67dRd4ckJ+ik7LIrWmceSOKSGa1m8DBsTv2dvgdGqvpqfoxXre3e HxW5wSAl4t96FHBR5ECikuG75nBBXaSsa+Cn/Rs4zaMfYinWE+GVua7iQZKmmwN7yAoQ PNJC4ZtMmjI/APF7hWbxsjTQwyEhXSRe3yygvbiP4mId44bpaUBVnUnIyju/zEBs5sLI rsHTIU8apCbRRDSuyRXlE06RlKOwstJvtJOmQxIAdC3hiHQ2EVz+1vxueSGUT+BTnXO8 DFP2WYdzBmzBeaHNTaLI4ttD2DyJwtm68mBYqI+4VnyDGn5/zD8ra4gDxpDXcca/rrwv AisQ== X-Gm-Message-State: AOAM533BSIWe1vxcIX5eKbSFdjppwL938zKHu+CzKN4qh4VASqbiuiog XPbZ/yCO2295ZjBjXIsS3wQ= X-Received: by 2002:a17:902:d890:b029:12d:5878:420b with SMTP id b16-20020a170902d890b029012d5878420bmr15299723plz.37.1629445656725; Fri, 20 Aug 2021 00:47:36 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.15]) by smtp.gmail.com with ESMTPSA id o11sm5937534pfd.124.2021.08.20.00.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 00:47:35 -0700 (PDT) Sender: "joel.stan@gmail.com" From: Joel Stanley To: "David S . Miller" , Jakub Kicinski , Rob Herring Cc: Karol Gugala , Mateusz Holenko , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] net: Add LiteETH network driver Date: Fri, 20 Aug 2021 17:17:24 +0930 Message-Id: <20210820074726.2860425-1-joel@jms.id.au> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds a driver for the LiteX network device, LiteEth. v2 Addresses feedback from Jakub, with detailed changes in each patch. It also moves to the litex register accessors so the system works on big endian litex platforms. I tested with mor1k on an Arty A7-100T. I have removed the mdio aspects of the driver as they are not needed for basic operation. I will continue to work on adding support in the future, but I don't think it needs to block the mac driver going in. The binding describes the mdio registers, and has been fixed to not show any warnings against dtschema master. LiteEth is a simple driver for the FPGA based Ethernet device used in various RISC-V, PowerPC's microwatt, OpenRISC's mor1k and other FPGA based systems on chip. Joel Stanley (2): dt-bindings: net: Add bindings for LiteETH net: Add driver for LiteX's LiteETH network interface .../bindings/net/litex,liteeth.yaml | 79 +++++ drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/litex/Kconfig | 27 ++ drivers/net/ethernet/litex/Makefile | 5 + drivers/net/ethernet/litex/litex_liteeth.c | 327 ++++++++++++++++++ 6 files changed, 440 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/litex,liteeth.yaml create mode 100644 drivers/net/ethernet/litex/Kconfig create mode 100644 drivers/net/ethernet/litex/Makefile create mode 100644 drivers/net/ethernet/litex/litex_liteeth.c -- 2.32.0