From patchwork Sun Nov 21 19:53:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Boger X-Patchwork-Id: 12693248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3552CC433FE for ; Sun, 21 Nov 2021 19:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/NVFiiKw3i7uT5TVDejpdoawQAQFWxu8iaqk8b2iecs=; b=Rz5pJw+/zFAcZ+ 5QMfq7xIRiOzlTST7RFE3urzQNMJuWLqh6tLaML0zrKt2cA7I/mGtH5RUcFr0YPY9yDfziyCwf4Wy /ae6mSWXhChm3J4zD0oMS6IT2BOIscS/qdKhUerJdz6g2Ro5NxhLXYizB4XnRSKt0UCjkK7lUVhVx OmhGDHfVQGt3LYO0WytmUu2PCSZ+MxSdXRIF5GdbyhMeJJt74QH4lssmYjsE4mJcYUYgpMiBC4pXZ TEYX7cVveV0HYbg2uBbeIAljJRHa0WiHFjxxa8HCjHo+dxJT835bssrdzh7T404SGrfS1O0ETPt+T m5oZrLfoNw1AUbwqPGwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mosv7-00EGOY-H6; Sun, 21 Nov 2021 19:54:37 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mosuc-00EGJn-1n for linux-arm-kernel@lists.infradead.org; Sun, 21 Nov 2021 19:54:08 +0000 Received: by mail-lf1-x129.google.com with SMTP id b1so70229744lfs.13 for ; Sun, 21 Nov 2021 11:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wirenboard-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=alj45tjzXeDfJ+7cslBZpCEeF9lcTvjC9KNxaxcnO9E=; b=1qZOxMA0fSJ7ozLQEbF8wX2dMGDkXUKzVIRteiG/npVKNS4C8tfWPDWEGmcHfx8gXz 8enTc2tv8DeYMmBU03pg0FjlL7hbmxhpU4COs7EM5dNP8AL5xPfCRgt/Qq1XxgBFwnop c0niKq5r7lMiv43OriZkDmvYzwp4ozLE4gVC8dFXWJUmjjguxnVEOygKo6x+XdwY/VzE PhjuOwm3teHdkt6yrJs4fOIiFIwe1lnyzgcF7Vrii8R3cFRnOp24hPE35Xca4Olsg5UV yyeoKHjP9InhFpBQfIOH3DJXnD/iKi3h9NhZfABMNybxZW4mxGmwmrdEDKAZTZv/oIk0 fsUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=alj45tjzXeDfJ+7cslBZpCEeF9lcTvjC9KNxaxcnO9E=; b=NjDcQ7Lae9659LTo7kDHx+qSUOYFloy/1tWy+RJxPXclLu+TsUhOok0htFEwmEdlZG Jl9noImMRPX4FbabpXL9xiX1drRuMHPDL5HSTmgAiLck29gZJyOoW5GkGNZgIj3TaiIe C8Ae6YxJRjYKvUYzAg02ohLAQG0Qk0rtShfCbVRuq5vSHEWzSMoF6ziS8TIsnVi6v68S xQHb0cF5J+byOb+Jw5jgPugH5HYxLLMr9tFZ4NOW4V9j6zmmtuABAj5RBlHsJhE/lpG/ Vd/8CGhthJ4EGVpokdVDlcKey/tNrD8PjxTq+7wfeTNr4m/a2GJu5fK/Q6sY5VFNfxVk naLA== X-Gm-Message-State: AOAM5339eQwm39xH1MmC9YgV6yoD3bRENKvc2NBzmtzUoU5dHXFRFWhx xZo4NBOVwH0uWkLy8ioRuAnkAQ== X-Google-Smtp-Source: ABdhPJyErcj/LDk+DJUfMBNW1gxvSi2lolzFq6sZthh1OnsHxTynUFegI7y5Nw5wlm11RsMwq3vr1A== X-Received: by 2002:a05:6512:16a8:: with SMTP id bu40mr23795710lfb.483.1637524441671; Sun, 21 Nov 2021 11:54:01 -0800 (PST) Received: from boger-laptop.lan (81.5.99.121.dhcp.mipt-telecom.ru. [81.5.99.121]) by smtp.gmail.com with ESMTPSA id a24sm768987ljq.18.2021.11.21.11.54.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 11:54:01 -0800 (PST) From: Evgeny Boger To: Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Cc: Evgeny Boger , devicetree@vger.kernel.org, Rob Herring , linux-sunxi@lists.linux.dev Subject: [PATCH v3 2/3] dt-bindings: net: support for Allwinner R40 EMAC controller Date: Sun, 21 Nov 2021 22:53:36 +0300 Message-Id: <20211121195337.230475-3-boger@wirenboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211121195337.230475-1-boger@wirenboard.com> References: <20211121195337.230475-1-boger@wirenboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211121_115406_136904_4FB87C96 X-CRM114-Status: GOOD ( 10.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org R40 and A10/A20 share the same EMAC IP. However, on R40 the EMAC is gated by default, so reset property is required. Signed-off-by: Evgeny Boger Reviewed-by: Rob Herring --- .../net/allwinner,sun4i-a10-emac.yaml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml b/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml index 8d8560a67abf..cbb297c38daa 100644 --- a/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml +++ b/Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml @@ -15,7 +15,9 @@ maintainers: properties: compatible: - const: allwinner,sun4i-a10-emac + enum: + - allwinner,sun4i-a10-emac + - allwinner,sun4i-r40-emac reg: maxItems: 1 @@ -30,6 +32,19 @@ properties: description: Phandle to the device SRAM $ref: /schemas/types.yaml#/definitions/phandle-array + resets: + maxItems: 1 + +if: + properties: + compatible: + contains: + const: allwinner,sun4i-r40-emac + +then: + required: + - resets + required: - compatible - reg @@ -42,11 +57,14 @@ unevaluatedProperties: false examples: - | + #define RST_BUS_EMAC 14 + emac: ethernet@1c0b000 { compatible = "allwinner,sun4i-a10-emac"; reg = <0x01c0b000 0x1000>; interrupts = <55>; clocks = <&ahb_gates 17>; + resets = <&ccu RST_BUS_EMAC>; phy-handle = <&phy0>; allwinner,sram = <&emac_sram 1>; };