From patchwork Wed Aug 25 12:46:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 502306 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp572295jab; Wed, 25 Aug 2021 05:47:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsQqXLsCDiDw3A1xoKdBvdMXoJmuja7/LS+gjcCxzvfn2ENIqEzUBw1TdNgW492d/7WMnm X-Received: by 2002:a17:906:c346:: with SMTP id ci6mr13257857ejb.479.1629895631906; Wed, 25 Aug 2021 05:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629895631; cv=none; d=google.com; s=arc-20160816; b=fyVeoHEtesBZWw1dyqZeXgN2MCbkKkR8+X/jUvG6Mw6e7b68O6Ly3ChUxG1QeC+T4w JVy6m+H6dSo7015+Vvze7cgK/fdSQD2NGd5y//DhgWjpxp8QkmX/jcFeOIwzSKoS1k/E z2TAyv0hdBzYCIVstUWmdWF++X327Wz98dZPtPRy3mHeYz+PN37cr8OSyu5knM5zIgQM JD+ey8zjm6debv7Kfp8nwePvmbWwwEyZbTGS4nZ72iV5gSe/WtyrOw94nuTFavmVa0fz T77DkEiVxoXYt9YOUm9OZWQ+fr2rlf3g3a/qSACoRdgLK4CXJDuw2JdqgPcphYIiYKHr igUw== 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=7duThHeJjxw1i1HwqENqMgEFWO8144Pl5kuBz52Xjek=; b=bMHEnCPTSjotYvP3LjnNbI0J0Mtw/2gn0yPpAtpM3dUUsGMLA+FpU3AeATBNa0/t6r UEaxqyJ0AAjDb74KiPqqocHyEXASOYcxkqZZSgWjykrXE4DRLDBxskONXWWYUTjHSnO6 bjj6/3yCByWtM+4pHYkN52yXbRvljuCwHfol1GvqU00RhsOF1husx/mQtQju6S7Zq3Mo fQ5K8CW3a1GMYu2NxKZwgxN0tGBwJpSAaRBNq+pVQSWlmVn9ooZ9sC65N7qCuaTHF8Al eC8wRXzpMcwlwJYxXwnCajMN4NXBsX1zy1IFeXe6acSUWgRxYkq95ZkRq0XqMD+qeTU2 h6aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IN4QMy5y; 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 hp7si13268503ejc.520.2021.08.25.05.47.11; Wed, 25 Aug 2021 05:47:11 -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=IN4QMy5y; 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 S240423AbhHYMr4 (ORCPT + 7 others); Wed, 25 Aug 2021 08:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbhHYMr4 (ORCPT ); Wed, 25 Aug 2021 08:47:56 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 947AEC061757; Wed, 25 Aug 2021 05:47:10 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id t42so18599229pfg.12; Wed, 25 Aug 2021 05:47:10 -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=7duThHeJjxw1i1HwqENqMgEFWO8144Pl5kuBz52Xjek=; b=IN4QMy5y401zq8WXwcAwqoe67+TVk9BJmkJaaJVhPjVPsVfC0n9PkskoEVmTerVpuW /8IQ/SYP/MoHImTyc8dTzcF4SUFivC8hOVDCW8wmtcpDltxxabsizcAIa5ff9LhYJHCQ HWBCEchU2idveA5tp37LYYSXLT78rfSnd0XdHuNtyK9N/jDK4hnYNPbiJ4UFxJ29R+PW 9Z2MtBg/y0KtcDa5nWM+ebM9lD96+eMT6EisaHHgxW6cAO4OB2Vz22PS6wzFY4uLjrM0 y9980Qa42NbbLpJmx0iQUQgNt3X8lAgN+8lHKUfV3Oethl6v+m7/BHni7zI8g6ckwgkZ vhSA== 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=7duThHeJjxw1i1HwqENqMgEFWO8144Pl5kuBz52Xjek=; b=QUPYvqWB/wfbAmo5vYQLPjP5GGd0ccLHHZUlz3v6WDoCoNqpNIlRfkEIksQUQjA+NW bw8v2GmQHTrHbGMYpYq/eTqqXPsBIW81M0WsLTtWpueV6jbL3eUeaWfxcMcqmkidMKkt 5YErCZE8DAaj3vn3bmiH3k0VQmhohuY1aUbt1ODR9MW3vK1fuUV0Kjc4L57adRH8dYWt Udpyon7kE5OVkP70TpnVLJSv0eUnZS+6bQFV8o3IcUTvcykeLxD7epjOicUoU8CFhYTR DITMgnoMIApgUiQx70nrDA0C+cBgSSYI9IK3eBwMH4RVYpydjs8rqkPxMbgJ74x2/hOi NeBQ== X-Gm-Message-State: AOAM532x83ld+9Zoax3HfNIl4SdowBczsoDhI5G4MuKoYOCSFNnQZg1Z t1Zo6wAuHbBsbeCUlFNYyzw= X-Received: by 2002:a63:fd51:: with SMTP id m17mr41616827pgj.395.1629895630017; Wed, 25 Aug 2021 05:47:10 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.15]) by smtp.gmail.com with ESMTPSA id s16sm21511301pfk.185.2021.08.25.05.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Aug 2021 05:47:08 -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, Florent Kermarrec , "Gabriel L . Somlo" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] net: Add LiteETH network driver Date: Wed, 25 Aug 2021 22:16:53 +0930 Message-Id: <20210825124655.3104348-1-joel@jms.id.au> X-Mailer: git-send-email 2.33.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. v3 Updates the bindings to describe the slots in a way that makes more sense for the hardware, instead of trying to fit some existing properties. The driver is updated to use these bindings, and fix some issues pointed out by Gabriel. 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 | 100 ++++++ 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 | 317 ++++++++++++++++++ 6 files changed, 451 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.33.0