From patchwork Mon Nov 13 01:40:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 164306 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp947052vqg; Sun, 12 Nov 2023 17:40:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEConGJUoq/VScG4A+STeEBBioxJY+HDU3TTiQDz1gzzBK05wsUamuNRt1I9/OLtNZ+697w X-Received: by 2002:a17:902:bc86:b0:1ca:8419:1855 with SMTP id bb6-20020a170902bc8600b001ca84191855mr3323690plb.69.1699839626832; Sun, 12 Nov 2023 17:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699839626; cv=none; d=google.com; s=arc-20160816; b=PoV4t+6ZqxfeNv4Q6T0PCbB0uXNl/jQyJghs3unwzvrDNFkPkoibgYcgics1T0kN9y JpplMP/QJfnEw3m9By14T+hMh74nf2i8NEzRcxNiF0heAwwSDWAsie6xcIKRi9C8LHC0 a4DCQrwnTZ2y5Y0B/j2vHEc/9HNQwez9CI41EFAkOTyIbX4zWv3M/1/pKOtmedZ+j0rM KUU+tcGMoVpi0a9WNrpSHUp9nRoBJdD6CXYMZCr5RWDmKMNa81eqCPmg+wvKOGurfCH4 3qs9bkDkzx3VMPua/w6s9MqM7zmOx7lIn5fMUCs2dVJltxE8Lym1QwQIC3u3a0RSMcQn lD0A== 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:cc:to:from :dkim-signature; bh=wtqg1rFWEHKzSzI4x+itPoe4FygsbFj76j8H27OY3F0=; fh=5SqrA/mwtZeIGB+ahwD6GsF+cx3qRl2POhnvnGpEm+Y=; b=pDZY+KVp4D83ihsXU47+8nq61SxuYgAY2XzY7wUTG+nHB57q6OLSahJAuNbpPtrXqE /cR5zIVbQXHIx/aE2z6L5e0OSimW38E959HtfRfluXTBf6FGpXu2g5W0F4a8WFPL8Qvj hd6sKuH4lze6RnYkDkkRNizuEpzBqSY0gXQB1ZYeYdLu9Zdk35eiWRiah+Qjcb1z4fod 2Y952gQdMi5qfZ/6EtXimW+ux86HAL1l1cc03gclgHhBmZhVif3/Zi48gIrajHHJpzgH aMhLpgHRsMOxnBvP8eaExaaL7i0yrzD9eUuc/uSx0510BtKTrYns0IVuFy4k8KQKhSc8 T3Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=J6Rns8e5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id z16-20020a170903019000b001c9c108bf6esi4920607plg.387.2023.11.12.17.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Nov 2023 17:40:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=J6Rns8e5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 B98F080A73D1; Sun, 12 Nov 2023 17:40:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232859AbjKMBkT (ORCPT + 30 others); Sun, 12 Nov 2023 20:40:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232836AbjKMBkP (ORCPT ); Sun, 12 Nov 2023 20:40:15 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBE93D7A; Sun, 12 Nov 2023 17:40:11 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-32fb190bf9bso2873469f8f.1; Sun, 12 Nov 2023 17:40:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699839610; x=1700444410; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wtqg1rFWEHKzSzI4x+itPoe4FygsbFj76j8H27OY3F0=; b=J6Rns8e5RA4H2lJRs7pncukaoagJzyVj0v5txgrum5f8gP/1Zf702VtdNdCJJ31m4/ lJusdKu5x0jEAZr4kBR43FSEei88Lg+BorpSJrj0EznWK1Civxu//peWuZZcXUc+LI6E esVqVCKwJdAXUV6dTgDZR7O0P5cfUM2JjF9RvRkagWayvnAdIk3iARvUFq5diyy83Lud odhmPvMdux1b3Zq0h5s5G5CBHa3j1R9cCRCJsjNjCfBvU0geAWGetAWal5FTbK/0Nn8L tPn6qP2i7k0xf7TnB7Tmsu/fXNuVgi9WVj2jGXTUz4AmZ0tUkLuDWwnc49wrj2k1wzqX 978g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699839610; x=1700444410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wtqg1rFWEHKzSzI4x+itPoe4FygsbFj76j8H27OY3F0=; b=t8KJ1fHQi0u0pQyOB0fuQLrn2Jdu7Pqm5zj+PR9RrNARyvTjXLV+6O4zpqn2g0bbVj vHgrXet8tNWJ6KpRGqL+eCuNTXUEiqo61rkkkUxirBkeB4ncFPxb09ZgD7gatwyWX8Cs CMBnHd9hCNdF/aTVCrp5etTCR1fLCP/oPluMWI+GENjLRfJ58WrLLzV/cBXmvdGn/mWI LxaJsdspdPX2nBohz/Gzo+NiVG1EQ+3wl8R6DKuqMnSK90OqdMaMp0ADymaw1wpLVm0x TjNjkNvnNyjiWok0dqbBkplwg6rij9fwR6eMir8r5/ZKAJXHN7Eu7MvdjZb3v0+Y6Lg5 7mLw== X-Gm-Message-State: AOJu0YwrV4RhY4FIQQHOBCVfIPjKwud1UJmDV3XfcB8GCs7xpRqFNUSs 3YVwvpZc6yFkmxsrUAHbDMM= X-Received: by 2002:a05:6000:2c7:b0:32f:7beb:d009 with SMTP id o7-20020a05600002c700b0032f7bebd009mr8787446wry.17.1699839610004; Sun, 12 Nov 2023 17:40:10 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id d16-20020adfe850000000b0032fb17c65desm4257268wrn.19.2023.11.12.17.40.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Nov 2023 17:40:09 -0800 (PST) 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 , Robert Marko , Vladimir Oltean , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Conor Dooley , Rob Herring Subject: [net-next PATCH RFC v7 4/4] dt-bindings: Document Marvell Aquantia PHY Date: Mon, 13 Nov 2023 02:40:00 +0100 Message-Id: <20231113014000.22840-4-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231113014000.22840-1-ansuelsmth@gmail.com> References: <20231113014000.22840-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 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]); Sun, 12 Nov 2023 17:40:25 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782411036682897003 X-GMAIL-MSGID: 1782411036682897003 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 Reviewed-by: Conor Dooley Acked-by: Rob Herring --- Changes v7: - Add Acked-by tag Changes v6: - Add Reviewed-by tag - Drop comments in dts examples - Improve commit title - Fix wrong reg in example Changes v5: - Drop extra entry not related to HW description Changes v3: - Make DT description more OS agnostic - Use custom select to fix dtbs checks Changes v2: - Add DT patch .../bindings/net/marvell,aquantia.yaml | 116 ++++++++++++++++++ 1 file changed, 116 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..9854fab4c4db --- /dev/null +++ b/Documentation/devicetree/bindings/net/marvell,aquantia.yaml @@ -0,0 +1,116 @@ +# 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 flash directly to the PHY with the firmware. The PHY + will self load the firmware in the presence of this configuration. + - Read from a dedicated partition on system NAND declared in an + NVMEM cell, and loaded to the PHY using its mailbox interface. + - Manually provided firmware loaded from a file in the filesystem. + +allOf: + - $ref: ethernet-phy.yaml# + +select: + properties: + compatible: + contains: + 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 + required: + - compatible + +properties: + 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 { + 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 { + compatible = "ethernet-phy-id31c3.1c12", + "ethernet-phy-ieee802.3-c45"; + + reg = <1>; + 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>; + }; + }; + + /* ... */ + + }; + };