From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 299173FBB5B for ; Thu, 18 Jun 2026 12:58:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781787515; cv=none; b=NxfBRszplJEhJXnEn9tGX2BceoPIsV4SyeePZTXvwjy1jybqrgdlSwNyJw3SOYW16lU5dslGOQNyEXDv5sL2pvCXVy/5dtlgzd3ls4iVT1aehMf4WjOaY07gvsiktHnLArhjJ453pF0hujOUw+AC08/UTNfnVcwbwSVy5pvL7IQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781787515; c=relaxed/simple; bh=q8erQ5YercewkjFj31D9or1Mr6d1F3WoS0ksnOd7MtM=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N3whfi1RYkAp8PVEpJUGZlZwt+S0GRI3Tr3kb38p7KUAaPJtncB/f7mUhpSlorY1xhNG9g6SVY51U8jW3I1wtrDka1/HP7sb5dWjRAmI+7a7mAzZsWJnyOp7MuwjT306MHCRUDNeuxo6wmzi/1ita0FhdcbeAG1n1H/dgoIVKVM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aQMMKtcP; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aQMMKtcP" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-490ac357c55so8204455e9.1 for ; Thu, 18 Jun 2026 05:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781787511; x=1782392311; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FLNBnsANrTUMdnBcC9IapvMl8huqE7Ah/L99fobP8RQ=; b=aQMMKtcPq6myk3QiZxFgl5IcExMeO7oakotgK6oRKGTAwMwx0Ey89a52K3Npr7kjRc OF959eWj7q2f7e5MnyDV88IK+dpxQ0pcgWSyjVAqZEbbMI6Z34eTpHr4GgoktgfvKLFq GU5NCKDOnY1N9PUnGqkaZVIce3ekykPs/9WvyNMzGT/91eyb72fJm5672gtg8yxxfx1L pSnhdpp4SqxOn2hWkz2LDkJqQYfs0BkpoUzdcXQlJIuz/uHAr0CBCBMV9oJKSVoNwgEE 7ri1cUk5d2DL77bmV2IAvxuJTXDxP6FFZ6M8GXDtMIRJhvnC5V2Xtj3NgIH5fYYY9Jg+ 82IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781787511; x=1782392311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=FLNBnsANrTUMdnBcC9IapvMl8huqE7Ah/L99fobP8RQ=; b=e40KxbrzREqeD7DHSkQ2E4c59E1GA/WRO257yk1iznVR7rr6Kzfdfos7pVx5pUn9RE yHe9kghbKpZYB8jEo97HXWmgeT9exzJFfX8K0q4Bnbogk88u9gx4ndkww4HEHT0WWO90 IngbpywWFaCk6Du1upMmV9OdWcSHOw+bApH3Hokkzn7rddEyf5AGPzj/XOL1LEm8pD+F f/nSzeq0yVw4LPKL69U14rgGFFT3SfPpFyGyLKarAF1fxsoCFRHThOXDaeUiDtSIn2Qb 6pk+F3HxCmoFplwYwpp4fo3h9bWyDcpTBZ4v+ccOR65ZKaEt3hSHXTuc/OxMxuIJh3v9 fJvQ== X-Forwarded-Encrypted: i=1; AFNElJ8VOLa9JUNkcWESpHr8QkoQDfArXMKG4ZGrDUlUkdsab1xrIGpcuOZZS9ORCFRHxdpXKVxNMeQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzOQteVwJlLJ4nJDpe1BZfSesOyoBu+sS88C2Kkd385YQMh01eB zBwwQrwjq7Uviy6CEVbuvrv592ev5J+UuC1vJA5Ow/nQyB/KIN0jBGp8 X-Gm-Gg: AfdE7clk+9tYgItTAebR4UH1ac3nWqmYJyJJRkfwZbKppC27zHddR5VRQhIrd1yLfhh 7ECZt1u3gmUrkuQS19KuDBITk6oXvdaZk8IvAP8Cc6Tq9WdV5Mvfc32DLUcMR3pKL7FAvXUquOz eGkdlgPTuIg9UurliTdTKvJqSsGTkmi57Q9eZ9bRljCj8NVF5EhEKZgGnIrIUXeWeR4xFKdaxkn 5TKFui7+puZgM2kk4QkzVxOnKmNLY4G7dVQEOhMF/jnMa6b5K+LggOWL5ax2UaskY2Ujod6oJ4/ JN9XoDyRm/YGLY2tp1g3faks5Pa9q6hK+J/iUKOlZTfg32OAd1qrjh78zCTsxkefRhvGzNtPgBN C/k6U3CryFolJUxkCAOGXbWHqz3eq2JadCEVFH85zjF985PCEmcUJIbO16XE8NuGv47N3FRkJ5+ g6gOe4/3171YSDDmy7nHtYB82LUqNYgXOUTTuM5FFIwXTOrmr32Y6iSOrhNG8nI0LS/dJ5prl0 X-Received: by 2002:a05:600c:c08b:b0:491:e3be:1363 with SMTP id 5b1f17b1804b1-49233354354mr120079815e9.0.1781787511511; Thu, 18 Jun 2026 05:58:31 -0700 (PDT) Received: from Ansuel-XPS24.localdomain (93-34-88-103.ip49.fastwebnet.it. [93.34.88.103]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-49230a458f2sm241451585e9.3.2026.06.18.05.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 05:58:30 -0700 (PDT) From: Christian Marangi To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simon Horman , Jonathan Corbet , Shuah Khan , Christian Marangi , Lorenzo Bianconi , Heiner Kallweit , Russell King , Saravana Kannan , Philipp Zabel , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, llvm@lists.linux.dev, Maxime Chevallier Subject: [RFC PATCH net-next v8 10/12] dt-bindings: net: pcs: Document support for Airoha Ethernet PCS Date: Thu, 18 Jun 2026 14:57:18 +0200 Message-ID: <20260618125752.1223-11-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260618125752.1223-1-ansuelsmth@gmail.com> References: <20260618125752.1223-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Document support for Airoha Ethernet PCS for AN7581 SoC. Airoha AN7581 SoC expose multiple Physical Coding Sublayer (PCS) for the various Serdes port supporting different Media Independent Interface (10BASE-R, USXGMII, 2500BASE-X, 1000BASE-X, SGMII). This follow the new PCS provider with the use of #pcs-cells property. Signed-off-by: Christian Marangi --- .../bindings/net/pcs/airoha,pcs.yaml | 261 ++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/pcs/airoha,pcs.yaml diff --git a/Documentation/devicetree/bindings/net/pcs/airoha,pcs.yaml b/Documentation/devicetree/bindings/net/pcs/airoha,pcs.yaml new file mode 100644 index 000000000000..9c1d116c1b01 --- /dev/null +++ b/Documentation/devicetree/bindings/net/pcs/airoha,pcs.yaml @@ -0,0 +1,261 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/pcs/airoha,pcs.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Airoha Ethernet PCS and Serdes + +maintainers: + - Christian Marangi + +description: + Airoha AN7581 SoC expose multiple Physical Coding Sublayer (PCS) for + the various Serdes port supporting different Media Independent Interface + (10BASE-R, USXGMII, 2500BASE-X, 1000BASE-X, SGMII). + +properties: + compatible: + enum: + - airoha,an7581-pcs-eth + - airoha,an7581-pcs-pon + - airoha,an7581-pcs-pcie + - airoha,an7581-pcs-usb + + reg: + minItems: 6 + maxItems: 15 + + reg-names: + minItems: 6 + maxItems: 15 + + airoha,scu: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the SCU node required to configure + the serdes line to the correct interface mode. + + phys: + maxItems: 1 + + "#pcs-cells": true + +required: + - compatible + - reg + - reg-names + - "#pcs-cells" + +allOf: + - if: + properties: + compatible: + contains: + enum: + - airoha,an7581-pcs-eth + - airoha,an7581-pcs-pon + + then: + properties: + reg: + items: + - description: PCS MAC reg + - description: HSGMII AN reg + - description: HSGMII PCS reg + - description: MULTI SGMII reg + - description: USXGMII reg + - description: HSGMII rate adaption reg + - description: PCS Analog register + - description: PCS PMA (Physical Medium Attachment) register + + reg-names: + items: + - const: pcs_mac + - const: hsgmii_an + - const: hsgmii_pcs + - const: multi_sgmii + - const: usxgmii + - const: hsgmii_rate_adp + - const: pcs_ana + - const: pcs_pma + + phys: false + + "#pcs-cells": + const: 0 + + required: + - airoha,scu + + - if: + properties: + compatible: + contains: + const: airoha,an7581-pcs-pcie + + then: + properties: + reg: + items: + - description: PCS MAC 0 reg + - description: HSGMII AN 0 reg + - description: HSGMII PCS 0 reg + - description: MULTI SGMII 0 reg + - description: USXGMII 0 reg + - description: HSGMII rate adaption 0 reg + - description: PCS MAC 1 reg + - description: HSGMII AN 1 reg + - description: HSGMII PCS 1 reg + - description: MULTI SGMII 1 reg + - description: USXGMII 1 reg + - description: HSGMII rate adaption 1 reg + - description: PCS Analog register + - description: PCS PMA (Physical Medium Attachment) 0 register + - description: PCS PMA (Physical Medium Attachment) 1 register + + reg-names: + items: + - const: pcs_mac0 + - const: hsgmii_an0 + - const: hsgmii_pcs0 + - const: multi_sgmii0 + - const: usxgmii0 + - const: hsgmii_rate_adp0 + - const: pcs_mac1 + - const: hsgmii_an1 + - const: hsgmii_pcs1 + - const: multi_sgmii1 + - const: usxgmii1 + - const: hsgmii_rate_adp1 + - const: pcs_ana + - const: pcs_pma0 + - const: pcs_pma1 + + phys: false + + "#pcs-cells": + const: 1 + + required: + - airoha,scu + + - if: + properties: + compatible: + contains: + const: airoha,an7581-pcs-usb + + then: + properties: + reg: + items: + - description: PCS MAC reg + - description: HSGMII AN reg + - description: HSGMII PCS reg + - description: MULTI SGMII reg + - description: HSGMII rate adaption reg + - description: PCS Analog register + + reg-names: + items: + - const: pcs_mac + - const: hsgmii_an + - const: hsgmii_pcs + - const: multi_sgmii + - const: hsgmii_rate_adp + - const: pcs_ana + + airoha,scu: false + + "#pcs-cells": + const: 0 + + required: + - phys + +additionalProperties: false + +examples: + - | + #include + + pcs@1fa08000 { + compatible = "airoha,an7581-pcs-pon"; + reg = <0x1fa08000 0x1000>, + <0x1fa80000 0x60>, + <0x1fa80a00 0x164>, + <0x1fa84000 0x450>, + <0x1fa85900 0x338>, + <0x1fa86000 0x300>, + <0x1fa8a000 0x1000>, + <0x1fa8b000 0x1000>; + reg-names = "pcs_mac", "hsgmii_an", "hsgmii_pcs", + "multi_sgmii", "usxgmii", + "hsgmii_rate_adp", "pcs_ana", "pcs_pma"; + + airoha,scu = <&scuclk>; + #pcs-cells = <0>; + }; + + pcs@1fa09000 { + compatible = "airoha,an7581-pcs-eth"; + reg = <0x1fa09000 0x1000>, + <0x1fa70000 0x60>, + <0x1fa70a00 0x164>, + <0x1fa74000 0x450>, + <0x1fa75900 0x338>, + <0x1fa76000 0x300>, + <0x1fa7a000 0x1000>, + <0x1fa7b000 0x1000>; + reg-names = "pcs_mac", "hsgmii_an", "hsgmii_pcs", + "multi_sgmii", "usxgmii", + "hsgmii_rate_adp", "pcs_ana", "pcs_pma"; + + airoha,scu = <&scuclk>; + #pcs-cells = <0>; + }; + + pcs@1fa04000 { + compatible = "airoha,an7581-pcs-pcie"; + reg = <0x1fa04000 0x1000>, + <0x1fa50000 0x60>, + <0x1fa50a00 0x164>, + <0x1fa54000 0x450>, + <0x1fa55900 0x338>, + <0x1fa56000 0x300>, + <0x1fa05000 0x1000>, + <0x1fa60000 0x60>, + <0x1fa60a00 0x164>, + <0x1fa64000 0x450>, + <0x1fa65900 0x338>, + <0x1fa66000 0x300>, + <0x1fa5a000 0x1000>, + <0x1fa5b000 0x1000>, + <0x1fa5c000 0x1000>; + reg-names = "pcs_mac0", "hsgmii_an0", "hsgmii_pcs0", + "multi_sgmii0", "usxgmii0", + "hsgmii_rate_adp0", + "pcs_mac1", "hsgmii_an1", "hsgmii_pcs1", + "multi_sgmii1", "usxgmii1", + "hsgmii_rate_adp1", + "pcs_ana", "pcs_pma0", "pcs_pma1"; + + airoha,scu = <&scuclk>; + #pcs-cells = <1>; + }; + + pcs@1fa07000 { + compatible = "airoha,an7581-pcs-usb"; + reg = <0x1fa07000 0x1000>, + <0x1fa90000 0x60>, + <0x1fa90a00 0x164>, + <0x1fa94000 0x450>, + <0x1fa96000 0x300>, + <0x1fa9a000 0x600>; + reg-names = "pcs_mac", "hsgmii_an", "hsgmii_pcs", + "multi_sgmii", "hsgmii_rate_adp","pcs_ana"; + + phys = <&usb0_phy PHY_TYPE_USB3>; + + #pcs-cells = <0>; + }; -- 2.53.0