From patchwork Fri Nov 11 09:42:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 624063 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0776C4332F for ; Fri, 11 Nov 2022 09:43:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233098AbiKKJnE (ORCPT ); Fri, 11 Nov 2022 04:43:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231235AbiKKJnD (ORCPT ); Fri, 11 Nov 2022 04:43:03 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EE02654E3; Fri, 11 Nov 2022 01:43:02 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id v4-20020a17090a088400b00212cb0ed97eso4254438pjc.5; Fri, 11 Nov 2022 01:43:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Zy9kRwEDKOwzUuzNDwbNK6Ls9wmAWU8wrTb8CY1ASBM=; b=UrYniHryQrt1oClRFAxO4NM+NTyxw9xTdQt/tkBzCt0JXKQGCjW0kEvDc+g/dhWFxA kTju6QYgbkEEWUEXYgQ4ASkeuc+fcO/hG8ZLC8HfcQka1+ymUzo8avwj5iUAU6UFlTBZ SSG9U27np35cWvCXoFcrJIrIFlLmwdf9qTSmPTL1vnD3ZSN0LDFxJuD8GUz/+d0+IYN0 qBgLo1yxsMiSAqS4gh06lPjWLswAlUjSSHP8oxMWb+lkBXfna77cBoSED+JUk9gUQWsG 2220ENr9ojjkMaxJlcRDFuTNaMvyu5jCO61MBbmrkF7vbu5sU8/OVXNoxH5KWGI1sm6w ZnOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Zy9kRwEDKOwzUuzNDwbNK6Ls9wmAWU8wrTb8CY1ASBM=; b=p6QeYZi04IZrpIx3QzWBro2kUqruG/iC8Q3sV+zosIpz8n9Do/d5Da7wVPid89Plqm 82GbDwfGp3OhJHXMvRXFZEuDFAgOWmjnKS3RBcsyXSjI9B2sLbMjP1wQva/xppRcF3bg 1KA+Y5+NvwjLIG0QZOf+d7d4vBn/ynrhd8js2zG19mCGiTYyWeL91yqL8h1vcZnR0s5l SMSKG/MTDe+fq79ATuNwbyDTPj7x+pme9IhFnxdw06uQqEzsTsW2J81QfWpT0mk1DzaC pblCCbQt6Ox+WWWul8CaPnKaflU4Y6fhR4ll8iebgn0ggZN0siINiWZ1wjeXJSaf3zfX f+2A== X-Gm-Message-State: ANoB5pkBxuTWI+iawC2JfvG6IIekQHhyX4pZiQQPOlBB7hS6psnTBHPB SPt8bbJdoF70aDZOGPGOShA= X-Google-Smtp-Source: AA0mqf5h6rFIEUsgsGftthsKMgAP7sfBcKl6GMZWDSIXy4cjabS77++RvLmXzawJJwNT6veT27xS/g== X-Received: by 2002:a17:902:d18b:b0:186:8568:be82 with SMTP id m11-20020a170902d18b00b001868568be82mr1510898plb.110.1668159782097; Fri, 11 Nov 2022 01:43:02 -0800 (PST) Received: from localhost.localdomain ([103.51.72.74]) by smtp.gmail.com with ESMTPSA id fa13-20020a17090af0cd00b002086ac07041sm1188450pjb.44.2022.11.11.01.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 01:43:01 -0800 (PST) From: Anand Moon To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: Anand Moon , Chukun Pan , Michael Riesch , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [linux-next-v1 1/3] arm64: dts: rockchip: Fix gmac phy mode to rgmii on Rock 3A sbc Date: Fri, 11 Nov 2022 09:42:33 +0000 Message-Id: <20221111094238.1640-1-linux.amoon@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On rk356x ethernet phy support reduced media independent interface (RMII) and reduced gigabit media independent interface (RGMII). So set the phy mode to rgmii. Signed-off-by: Anand Moon --- arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts index ea74ba32fbbd..72e410e3aca8 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts @@ -253,7 +253,7 @@ &gmac1 { assigned-clock-rates = <0>, <125000000>; clock_in_out = "output"; phy-handle = <&rgmii_phy1>; - phy-mode = "rgmii-id"; + phy-mode = "rgmii"; pinctrl-names = "default"; pinctrl-0 = <&gmac1m1_miim &gmac1m1_tx_bus2 From patchwork Fri Nov 11 09:42:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 624062 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C5C2C4332F for ; Fri, 11 Nov 2022 09:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233656AbiKKJnU (ORCPT ); Fri, 11 Nov 2022 04:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233670AbiKKJnP (ORCPT ); Fri, 11 Nov 2022 04:43:15 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05820654E3; Fri, 11 Nov 2022 01:43:15 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id d13-20020a17090a3b0d00b00213519dfe4aso4288567pjc.2; Fri, 11 Nov 2022 01:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=OJCmo94b1oJ9vc0/hCwgxQah+/q6uvuZ9wtDIOuRZ/A=; b=ni+fvzQCq6/9nD9W/JZrMrtM1lUktOy/aSft4Q/Qsd7BxmT4A8kPvgtrhKu98w1874 UtqN7jPJsOq3PvlCK0/lRnM7/uVZSHteJHOGoCXQjHHxHpWaA1dbUUFih+Tezat7JNfT vVJG8qnHkHxRDrSl8eR8NZRuM7cDPOP8a8po/S/tJJzumvc7bH07zbUHr+G+Fo/kWLHj Sl3EiIknP5T+14bdwNEhYANFgwRt9feWSrUl8SYLrXclVhmG7lJP5oZTXdEV/VnBfEmL O4Rb3ynKqxPSqp4KOXIu83Hbqo2zMc65IntCrcs+tg8ZXTVZLBAij84n36zYIRKLUSTB DJFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=OJCmo94b1oJ9vc0/hCwgxQah+/q6uvuZ9wtDIOuRZ/A=; b=WbCB/IboFJ0Qge4RL7GmejPuHZHXWU+TUeLZ8qnU19rv2my3YSnlrjeBJdzYFUMW2x 1M99RwWoxz+VuAMFdJzGIxVMgIoXGMpwJj7tMlBbDyQFnvF533Q4E7D9yA7MZ3Wbqz4B MjMW6txG1oxcsfztlKmZJf6CrqHmY5ZOb23FQ+QMxUOQfWfAazV51hn17eLoeGiNygHi xmxazNBhCSApLmvAJ+QmQ9JwMaDbeiRF4Djt8cEAy96+4h68+q/PDn0aCeAkvSejd7od R11blnETN0SdzELDtVkXWHMeF3NUCnZldvCKPDnH9STEbl12iti6MeoUJ21NJIPUBzD/ Bznw== X-Gm-Message-State: ANoB5pmrOyZTaTpag6rPAXBJLprP/lSwkQ5Fw5a+CZXLO5dTVcYKHIj0 /gCFicW0y46LsrKAbl4WRRI= X-Google-Smtp-Source: AA0mqf5H/u8fFcWTrP/MrfNUDIYjFsgnm/vxcngxEwxttD5qYOnMHkpF+EpdyRJEPUbDKSiCmNZwnw== X-Received: by 2002:a17:90b:2710:b0:20d:48bc:6666 with SMTP id px16-20020a17090b271000b0020d48bc6666mr1053055pjb.98.1668159794615; Fri, 11 Nov 2022 01:43:14 -0800 (PST) Received: from localhost.localdomain ([103.51.72.74]) by smtp.gmail.com with ESMTPSA id fa13-20020a17090af0cd00b002086ac07041sm1188450pjb.44.2022.11.11.01.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 01:43:14 -0800 (PST) From: Anand Moon To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: Anand Moon , Chukun Pan , Michael Riesch , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [linux-next-v1 3/3] arm64: dts: rockchip: Fix ethernet reset node Rock 3A sbc Date: Fri, 11 Nov 2022 09:42:35 +0000 Message-Id: <20221111094238.1640-3-linux.amoon@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111094238.1640-1-linux.amoon@gmail.com> References: <20221111094238.1640-1-linux.amoon@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add support for snps,reset-gpio reset ethernet gpio pins and drop the mdio reset code. Signed-off-by: Anand Moon --- .../boot/dts/rockchip/rk3568-rock-3a.dts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts index 16fff1ada195..9172cf60b867 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts @@ -258,6 +258,11 @@ &gmac1 { assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>; clock_in_out = "input"; + snps,reset-gpio = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + /* Reset time is 20ms, 100ms for rtl8211f */ + snps,reset-delays-us = <0 20000 100000>; + phy-supply = <&vcc_3v3>; phy-handle = <&rgmii_phy1>; phy-mode = "rgmii"; pinctrl-names = "default"; @@ -267,6 +272,9 @@ &gmac1m1_rx_bus2 &gmac1m1_rgmii_clk &gmac1m1_clkinout &gmac1m1_rgmii_bus>; + + tx_delay = <0x4f>; + rx_delay = <0x26>; status = "okay"; }; @@ -583,11 +591,6 @@ &mdio1 { rgmii_phy1: ethernet-phy@0 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <0x0>; - pinctrl-names = "default"; - pinctrl-0 = <ð_phy_rst>; - reset-assert-us = <20000>; - reset-deassert-us = <100000>; - reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>; }; }; @@ -625,12 +628,6 @@ vcc_mipi_en: vcc_mipi_en { }; }; - ethernet { - eth_phy_rst: eth_phy_rst { - rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - hym8563 { hym8563_int: hym8563-int { rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;