From patchwork Tue Feb 27 09:39:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Curutchet X-Patchwork-Id: 21011 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2588594dyb; Tue, 27 Feb 2024 01:41:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXS58x14jJAN4IWTWbp7rtxWBs1SXWBOZajUetOZfwRIuIQaJySvNFe69HpoKA/WDYCsBUrbjWG4ZjX8Bw0RQ3TKAKRmQ== X-Google-Smtp-Source: AGHT+IE7MWuiXsIjsaHrRUCgUVIRsHJ9eJAKQoV/4dBJC75B0hteI1x2LcSfsOHZ3NLZF8ZnOzhE X-Received: by 2002:a05:6a21:3417:b0:19e:5ac2:a342 with SMTP id yn23-20020a056a21341700b0019e5ac2a342mr1554694pzb.17.1709026888272; Tue, 27 Feb 2024 01:41:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709026888; cv=pass; d=google.com; s=arc-20160816; b=IMm7nlYVWUfYA+XobwtphUGYxcSV2RmbOnOEyHd5fVqx9N92oeaeI7+n/UK3mFpAM5 U64kW6Ku81W2ZNWTwGLcO9pNzML5RwNtojw0ppVyx8TZhu0/UmE8oOlQLb0tggXGmB0x Oe47hSFenabJduJ86Gc2fCPALcdd/j1UzMVFe6VgBVHbUFulV0i1nEkdurVZLKhtjBYg BoVrXDSmJKvlwI+f7qmLCmUZyt7CJtK/YQX+rXbL2YXVT1yWQRTfu/yr7E7yjhn98L9+ 8nQRZ+IqJxwiebqpORDqOPoHqHSqykkS7VmuVQ+5Bhfwr+iVnM+iHTha/89ZDa1JjxyT DbnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=6AJf+zzN7UHsiDVB1kdGMfmPws28cjDW3HCy8ItyxK8=; fh=leM6McOwUD8a7DalviW4Yv/21HOmqHPF/ma7EySur/M=; b=IjiWAAY+iOYWIdd522pm3F6x3NKLEgtjrqjaR3AZMPQCUONLs8q0t96WRUQNiQbIvc BHGkA3iPA2m7FywD7i5q3/FqNNMgb0WYWY2jjbkLD+RDCsWreTmWuNWGw9N94Xwnvi95 bNlOCaak/mviuS7LtrkphrGZ1STGOkW3E7QBfCojUka2REwjbUdAlYAxXNR/+W5z7Rlx rYYI1Phu598eUir07uQraIMzRTP0qs0h1T6mwUavk20pSMEzbDeQtCGb0xGcMHswUi/i VvJfVZwhKQCZNPmgPiFN480J7KUGXWssduy+w55CsFMbHx8cPqNASBI6mN8QUWxv38Oc Mj0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TxJJHgRB; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-82973-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82973-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t187-20020a632dc4000000b005dc5dc82729si5169391pgt.541.2024.02.27.01.41.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 01:41:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82973-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TxJJHgRB; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-82973-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82973-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5BAF228307A for ; Tue, 27 Feb 2024 09:41:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 655891384BD; Tue, 27 Feb 2024 09:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="TxJJHgRB" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C565513699A; Tue, 27 Feb 2024 09:40:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709026812; cv=none; b=kE7p7+sex8DLj5DNbPYLwvZTbkLEb/5v8df2g5AAjnkztPWmw/T19nq8naD5HWHHigKJVs8RtIfHkOVFSF71yYEj4j3QB9In8jyTtJjlGMunBRKvnebP40F3LykM+9REkctzqcGmBzxSu8cTVPum4yIUweujyWQW9YQrUYWywEc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709026812; c=relaxed/simple; bh=8r24iKPhibOS40zxMGUMNspSc4hHZnzNSAnmzkFnOuQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=u5wupXkC8BC1x4zgsJl/LkEHziJWfIt889GUNw6ZVROqogDNYlHDkF6WP/CQaglQdH893uv1IoN6PmqS2Sgq0bKyXSB4MV+HkaeqTdeXTFdEdqymuHKZVG4wUf/LUJCyfurOolMbfrB1qHfXx0rSqpod/1tEJvkG6fsbWBV6hTs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=TxJJHgRB; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPA id 2F16A1BF20D; Tue, 27 Feb 2024 09:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709026801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6AJf+zzN7UHsiDVB1kdGMfmPws28cjDW3HCy8ItyxK8=; b=TxJJHgRBlziCllHZOJT4RWWHW7gaP3x6pfe/Ui3GaJsL45Xar59xbK+U5IWRw5W6t1GCid AWjoJB8O5pXFF4NIjfuHb78p/K/JgkOXAufKjW49BLNuqZh1GQ2wikgW6rNTmxI38A8JaY ZqYTfx5rN4nrh4g/g0URnJ0majjlVNsVROBWVtca43tea+0oTmnuZSZ5JGQYFs2+jWYJGy fCxZpLdrQq1IshfWDlv/xP3ZDKNM8TZAhVmiDgZobjyMehuPRfb6I0ySq7bCSOffyDnaWM rQBbkukWN3Fi3ElTonkCO4jDt6Ng1pELeivZsBhXiptLzCW1Fxno7sHuy6aghA== From: Bastien Curutchet To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Pavel Machek , Lee Jones , Richard Cochran , Andrew Lunn , Heiner Kallweit , Russell King , Bastien Curutchet Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-leds@vger.kernel.org, Thomas Petazzoni , herve.codina@bootlin.com, maxime.chevallier@bootlin.com, christophercordahi@nanometrics.ca Subject: [PATCH v2 0/6] net: phy: Add TI's DP83640 device tree binding Date: Tue, 27 Feb 2024 10:39:39 +0100 Message-ID: <20240227093945.21525-1-bastien.curutchet@bootlin.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: bastien.curutchet@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792044578735566218 X-GMAIL-MSGID: 1792044578735566218 Hi everyone, This patch series adds small features to the TI PHY DP83640 : - Add LED handling through /sys/class/leds to use the three configuration modes offered by PHY. - Add Energy Detect Mode handling through ethtool's {get/set}_phy_tunable() - Add a device tree attribute to be able to override the hardware strap configuration if needed. This attribute allows to enable/disable fiber mode. Change log v1 -> v2 : - LED Configuration is now done through /sys/class/leds insted of DT - Energy Detect Mode is done from {set/get}_phy_tunable() instead of DT - The DT property to enable/disable PHY control frames is dropped, the feature is disabled directly in driver as it is not handled anyway. - The CLK_OUT pin handling has been dropped. Bastien Curutchet (6): dt-bindings: net: Add bindings for PHY DP83640 leds: trigger: Create a new LED netdev trigger for collision net: phy: DP83640: Add LED handling net: phy: DP83640: Add EDPD management net: phy: DP83640: Explicitly disabling PHY Control Frames net: phy: DP83640: Add fiber mode enabling/disabling from device tree .../testing/sysfs-class-led-trigger-netdev | 11 + .../devicetree/bindings/net/ti,dp83640.yaml | 77 +++++ drivers/leds/trigger/ledtrig-netdev.c | 4 + drivers/net/phy/dp83640.c | 299 ++++++++++++++++++ drivers/net/phy/dp83640_reg.h | 24 ++ include/linux/leds.h | 1 + 6 files changed, 416 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/ti,dp83640.yaml