Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4181649pxf; Tue, 6 Apr 2021 09:46:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyp3XdjYyPsyEwmty4XCAFEZBb1FqLqUT09AK960jRVG5BGaiVP1E1pMriZWmx0irUn6uBT X-Received: by 2002:aa7:c850:: with SMTP id g16mr38503805edt.324.1617727574194; Tue, 06 Apr 2021 09:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617727574; cv=none; d=google.com; s=arc-20160816; b=BlwYXWuZHPOn/dD5EzmlAUrjemdmKKdEspu5kCTI6wQpd1OmN4v3hEfTijGYLjvJ2C cYld8bRXizwCE6tqDO6WEHnVKSzEwQCgmn/u2mqecKMZVjnIxDE8uAUZq+7fcoVAIEYA m6igtiD8TjxkXZdM2wbU4INoFMmHN4umU35NVv+vHPc/rKhghumLQ3TpwhwXoolSY1bS 3uyReefRawZ67tTbwJMoAMEyZbB7QWOT+U5SljVaP04kWfxastg1CubXSS1H5KMvoltj NiKpHcv8hfuKco3QymMD/41GxoMHMvhVsOFXFXdGZq8X1mslQosoXE3JnJZbgKdZFaFS 2V3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=isZ5kV3hcGyVHNx3xikshGr05T2fizU/DZiP3qKBK38=; b=xpHcGAvQ8Y9/x0EZ90+aefbvzKYTGU7Tj52OLBgGlutLk/ytTvQWuhkhLEVcVcVLQq dQtMuN4xIcJBxg4RN6at9y9bkGzGWz0m4R1PN1i8kZrM07J7JU5+Xuc7cBdV6AoaNqrK FbwOIkVgjiWX5N8qcNiOWGG6/t610C4OLGciAOaPM15Yf10uy2tkdHlbIR5x71fd8XrY Uo0GsU5R5aS4TlQs21HHok+UTv5HCf1pAhEiNYrf9x1O7EIbjLV7h173ksKYBVmg0RhQ 3OVCOqdZVmGWZM17BMIIpFR1hLuKusFCueWdNM/hbrZSSYc8Jd3tiNxFdkQQKE/cAVD5 uoWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xt7xX1sx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si4011277edw.551.2021.04.06.09.45.50; Tue, 06 Apr 2021 09:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xt7xX1sx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232456AbhDFIQN (ORCPT + 99 others); Tue, 6 Apr 2021 04:16:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232041AbhDFIQN (ORCPT ); Tue, 6 Apr 2021 04:16:13 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22427C06174A for ; Tue, 6 Apr 2021 01:16:04 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id b4so21344199lfi.6 for ; Tue, 06 Apr 2021 01:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=isZ5kV3hcGyVHNx3xikshGr05T2fizU/DZiP3qKBK38=; b=xt7xX1sxO+zKckULPY9hGfIdjtQlAEODi6Anjq6kzJ2pdqY6UIq9Hl/PRdM6+amm9+ mmojXPazGYpsaVAa3tYF7N0jAMD3CEtRgeMUczYZ952hDturVQmbqrjLRmbTwXQYeGho 6g5bGSPzrA9pfGFp5ZGDHPnLB3Id5CgC7SUuJZHiN5JntF0nyWByMYfs7FozN3amOrBy knllXWukmSvQElREjw/RAQFDNul95IRh1WIgCVW9do1Exn0WXSVjbSC6IpDuAWZF5t+v UIjmuhzGIS8G8w3en36frU5+2lRQz8C0jJJE0Of7CWxdmN0M33CMuvBHXemInrEDglRK OpFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=isZ5kV3hcGyVHNx3xikshGr05T2fizU/DZiP3qKBK38=; b=t5CNeB9M37FmWBGrSumpDoCpkLDAFTQv0VDohS4s5CfLYE04NwmpqQOcn8qsnfdTML zNxzdDMHivAxfXUVBfaVEfbN4E6yUGSuQyh/xCxL698H1DIu1MnJHVRH+H3NkgemHtKW CDYhTEMAeQSQKGjlUAJIuiO+SYuV8gIuY1VGhoKQf4EyfkmU51j0+DuGnIrMMnMehktn SWmt8wj9G04GkDFUXOaeliBQc6cCo2MfreqzqJBVTAIEuUEEgv/2HWQVjxB8uWaIhfRw bkqFgMfCT5Iue6PtOHrmWcNTxvwMOrApCeyYBTGt+nZRshOrtpUlRn87qtylpQgp0jNV mUuQ== X-Gm-Message-State: AOAM531SMOzYfe5rWHW6xJmR5Gcq8UNobR7j++lWKrKokoe3qXO/5C4h R7PxUT4UJaFtIr/57Pt1gNpK/25jJ0mVN/+u+kzEEA== X-Received: by 2002:a19:ef18:: with SMTP id n24mr1928131lfh.291.1617696962602; Tue, 06 Apr 2021 01:16:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Walleij Date: Tue, 6 Apr 2021 10:15:51 +0200 Message-ID: Subject: Re: gemini: sl3516: Mainlining of NS 2502 To: Corentin Labbe Cc: Hans Ulli Kroll , Linux ARM , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 5, 2021 at 8:39 PM Corentin Labbe wrote: > I own an Edimax NS 2502, which is a NAS based on StormLinix 3516. > I successfully upgraded it with a recent Linux. Pretty cool! > mdio0: ethernet-phy { > compatible = "virtual,mdio-gpio"; > gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */ > <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */ > #address-cells = <1>; > #size-cells = <0>; > phy0: ethernet-phy@1 { > reg = <1>; > device_type = "ethernet-phy"; > }; > }; This looks like the most typical way to attach an MDIO phy. I always try to identify the exact component used on the board. Do you have a high res board photo? Realtek RTL82111 is the most common configuration. Compare to the D-Linux DNS-313 DTS: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/gemini-dlink-dns-313.dts Try just copying the whole pinctrl-gmii section! > syscon: syscon@40000000 { > pinctrl { > /* > * gpio0agrp cover line 0-4 > * gpio0bgrp cover line 5 > */ > gpio0_default_pins: pinctrl-gpio0 { > mux { > function = "gpio0"; > groups = "gpio0agrp", > "gpio0bgrp"; > }; > }; Change groups to groups = "gpio0agrp", "gpio0bgrp", "gpio0hgrp"; So you mux in group h which is where the GPIO 21, 22 go out to the MDIO on 3516 IIUC. The right mux out is pretty important, if you have vendor source code, please share so I can check how they set it up. > BUT neither ethernet nor USB works. For USB try this patch: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git/commit/?h=gemini-usb&id=cbaf6cdf770b90de5f10bfa5112c679f1dffe948 Pls report progress! I hope we can mainline this device. Yours, Linus Walleij