From patchwork Wed Nov 1 12:36:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 160538 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp384789vqx; Wed, 1 Nov 2023 05:38:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGX2rnEnXBHeNwQWnl5WD9lC4+27I/uuCatIOt281D8MkMxny/crZqmejXk7NUcU7ncQ1dw X-Received: by 2002:a17:902:6b48:b0:1c5:8401:356c with SMTP id g8-20020a1709026b4800b001c58401356cmr12070618plt.62.1698842314026; Wed, 01 Nov 2023 05:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698842314; cv=none; d=google.com; s=arc-20160816; b=oKDkriwoorBL4j4Y9LMz1fh1NOenxND7xOJlugP5GMQVjPBiC5H4KG4DeL+Omg0Ihl OD3flc4iApo4Xdg3uCXJ2EI0MWaM3Q4PXsImE8KqvfVj275ynFIgJkjdmW+Q4Y/0+fgD aeT8zAzfZqnXuE7P3u52gnEsGVRFt41ueWIiuOkp4D+iElSppQJwpVvjct8MCF8rfJZP YVJiPqHZxGczZNi74OLao+dFZN6BGVfIrum46LjeCbT6EqS/l7RHvEaR8WTIm1KT6B7h yO1DqHY47pIFqrq4xj0HEGdTGfo7HaHUMe5kG2wYobR2l4LtW36RtmYjWAXlFsTfguFo m9xg== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=bAjxWab9FuMrPYW8KTN90/drF/opLkjSX2ZaRRk1GLQ=; fh=kQ7oJdLVsTGRRsBGxp1TQ+LbiibGrFxoFtHDIr4oQOk=; b=CSFSrYqR8VDilhRHXHuTjMwSCNlvLhCTb14RAfRs5tSKDPUfhH5vYjWbBXdAbgvbRs 9igb7wX+Y1LZ9wLe51pCEH3cPzJGH9+lRLzcVt1XmQO65JGaORp0GoOKZ0jUWa73K5Ap r27m2dFI+6Dqf3Dj988RwPnfkgj4yjm2+3l3W83Oi8tfieZSMoICQNwE3U5vOGgmQ0kT HJkO1km0xFnQuI9r9/lYNUMmRzg9EpirlVLY8cLT7vwmL9HRR5rZwMQJZNeQIhpwHrs5 fjNCxaU4qZVQqd+q06AfSQd18NG8qggnQVFj0Apukk4SecRQ+vqZM7b7zBVmGDZSqSf/ 6elA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d40CEUi4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f11-20020a170902ce8b00b001ca86fa1e1csi3058662plg.484.2023.11.01.05.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 05:38:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d40CEUi4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 E88238092236; Wed, 1 Nov 2023 05:36:42 -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 S1344051AbjKAMgb (ORCPT + 35 others); Wed, 1 Nov 2023 08:36:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235523AbjKAMg0 (ORCPT ); Wed, 1 Nov 2023 08:36:26 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86A6CE4; Wed, 1 Nov 2023 05:36:20 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2c4fe37f166so91987191fa.1; Wed, 01 Nov 2023 05:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698842179; x=1699446979; 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=bAjxWab9FuMrPYW8KTN90/drF/opLkjSX2ZaRRk1GLQ=; b=d40CEUi4z/DjtLoFJwr0ohhvWdiq6eHdlVIFoaguxR5iwOspnFBgUyptUROcQVqObc a48ibU8zV3Lv6RciNCCNXQu4prKmBI450P+E8XktPaIgwdSLqNvJlbsSEA1zcLp5wtLU QIUMuBxypk8t/MZtf7OwWM6yeyPjHtdFjDY4xPjuEYzckdBfLC6kagQgrUmkTviZZGh1 p5AefA4hR4/ww6klJ1opIYTCAJNn2AV7I2cHZgbVOKHlGLC/DL4KsmSNwmdxWO1HSMwi 0EafUn9ygvDUcaizdDVdD24HvhtjI6BcrRmFdiFyLHJ2ihMDMbIky9ICa3KYYBwZA8kc aRFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698842179; x=1699446979; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bAjxWab9FuMrPYW8KTN90/drF/opLkjSX2ZaRRk1GLQ=; b=mp4Tzj/kV7g3/Y3kVvztdA33h35YTZmXy0eYvkpq1F98Zs9Jjhxb5t08qovh5lt7qG CaRUgpVO6spmjoInEeD1gWQdqFLEDCRa3T7qcRhoCqMdYSjVwGNcKWXUIIuPI7b6PrlQ Hfm3W0pujh5ndtwno9aLJ8FtI6eGo161nM3YVtGPPJTvXJNOI4bkXaraNPZgWtdlySNs CLI7ceWN1kwiALlkufZfoKmnPZusfAtaBM8SVRU50+VoK74uc7HC0qpBaRfgWHWtdbw/ WyURcqlGe0P7bUBos8sHBQgETQPfwyabrY4iWP0pboAhPnYoSeU2LIsifbVu1MUgefpU 5KFQ== X-Gm-Message-State: AOJu0Yw31A1zHb9zfV1UVMZBLon48eS6gktthEE2kfqjpHfTv1vQgLQF ODZwxfkTjhKDG0Al/v28ReQ= X-Received: by 2002:a2e:2c11:0:b0:2c5:6df:8b2c with SMTP id s17-20020a2e2c11000000b002c506df8b2cmr12290289ljs.45.1698842178449; Wed, 01 Nov 2023 05:36:18 -0700 (PDT) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id r6-20020a05600c458600b00405959bbf4fsm1449832wmo.19.2023.11.01.05.36.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 05:36:17 -0700 (PDT) From: Christian Marangi To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Heiner Kallweit , Russell King , Christian Marangi , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net-next PATCH v2 2/2] dt-bindings: Document bindings for Marvell Aquantia PHY Date: Wed, 1 Nov 2023 13:36:08 +0100 Message-Id: <20231101123608.11157-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231101123608.11157-1-ansuelsmth@gmail.com> References: <20231101123608.11157-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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]); Wed, 01 Nov 2023 05:36:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781365278447149631 X-GMAIL-MSGID: 1781365278447149631 Document bindings for Marvell Aquantia PHY. The Marvell Aquantia PHY require a firmware to work correctly and there at least 3 way to load this firmware. Describe all the different way and document the binding "firmware-name" to load the PHY firmware from userspace. Signed-off-by: Christian Marangi --- Changes v2: - Add DT patch .../bindings/net/marvell,aquantia.yaml | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/marvell,aquantia.yaml diff --git a/Documentation/devicetree/bindings/net/marvell,aquantia.yaml b/Documentation/devicetree/bindings/net/marvell,aquantia.yaml new file mode 100644 index 000000000000..f2248a81fbe7 --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell,aquantia.yaml @@ -0,0 +1,123 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/marvell,aquantia.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Aquantia Ethernet PHY + +maintainers: + - Christian Marangi + +description: | + Marvell Aquantia Ethernet PHY require a firmware to be loaded to actually + work. + + This can be done and is implemented by OEM in 3 different way: + - Attached SPI directly to the PHY with the firmware. The PHY will + self load the firmware in the presence of this configuration. + - Dedicated partition on system NAND with firmware in it. NVMEM + subsystem will be used and the declared NVMEM cell will load + the firmware to the PHY using the PHY mailbox interface. + - Manually provided firmware using the sysfs interface. Firmware is + loaded using the PHY mailbox. + + If declared, nvmem will always take priority over fs provided firmware. + +allOf: + - $ref: ethernet-phy.yaml# + +properties: + compatible: + items: + - enum: + - ethernet-phy-id03a1.b445 + - ethernet-phy-id03a1.b460 + - ethernet-phy-id03a1.b4a2 + - ethernet-phy-id03a1.b4d0 + - ethernet-phy-id03a1.b4e0 + - ethernet-phy-id03a1.b5c2 + - ethernet-phy-id03a1.b4b0 + - ethernet-phy-id03a1.b662 + - ethernet-phy-id03a1.b712 + - ethernet-phy-id31c3.1c12 + - const: ethernet-phy-ieee802.3-c45 + + reg: + maxItems: 1 + + firmware-name: + description: specify the name of PHY firmware to load + + nvmem-cells: + description: phandle to the firmware nvmem cell + maxItems: 1 + + nvmem-cell-names: + const: firmware + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-phy@0 { + /* Only needed to make DT lint tools work. Do not copy/paste + * into real DTS files. + */ + compatible = "ethernet-phy-id31c3.1c12", + "ethernet-phy-ieee802.3-c45"; + + reg = <0>; + firmware-name = "AQR-G4_v5.4.C-AQR_CIG_WF-1945_0x8_ID44776_VER1630.cld"; + }; + + ethernet-phy@1 { + /* Only needed to make DT lint tools work. Do not copy/paste + * into real DTS files. + */ + compatible = "ethernet-phy-id31c3.1c12", + "ethernet-phy-ieee802.3-c45"; + + reg = <0>; + nvmem-cells = <&aqr_fw>; + nvmem-cell-names = "firmware"; + }; + }; + + flash { + compatible = "jedec,spi-nor"; + #address-cells = <1>; + #size-cells = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* ... */ + + partition@650000 { + compatible = "nvmem-cells"; + label = "0:ethphyfw"; + reg = <0x650000 0x80000>; + read-only; + #address-cells = <1>; + #size-cells = <1>; + + aqr_fw: aqr_fw@0 { + reg = <0x0 0x5f42a>; + }; + }; + + /* ... */ + + }; + };