From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 442A6C433E1 for ; Wed, 15 Jul 2020 14:22:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1DDEF2064B for ; Wed, 15 Jul 2020 14:22:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lCcrKo0G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728295AbgGOOWN (ORCPT ); Wed, 15 Jul 2020 10:22:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728121AbgGOOWN (ORCPT ); Wed, 15 Jul 2020 10:22:13 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1DDEC061755; Wed, 15 Jul 2020 07:22:12 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id e22so1741283edq.8; Wed, 15 Jul 2020 07:22:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J4YLq7ad8Ku7+EWFa0/mgk39lvRv5vsUDuPSLGAmMis=; b=lCcrKo0G+0r8E1QGKPPSeKTD6jPE8Sc6irv4/pOM95bnJP53927eRuCyYXGeGkV9fd 4mAETYDfMMhmValjwwKkzgyw6wNRUSM7HPaYym0azD4zlCU3nckTdg4+j1Wc53w3nOHA O1x4YZWvOSoxt6Ki5XkR4PxFJ2sl5ih71h1LHgcgiViNmWv4Groshm3PXgvKN4TJT7MH 8TG+hVZ4AaNClt0XH3+2cPGeaAwLX9Nb/XP5ixDGbggf5vtZTfFJFyppqTL9x3mDCHfO b4nFyNmrOU8X1KLO5q+5txBX/3CO8n6xnjqpC15H43ua/BRMEViLX4C0QztCHodDD7LN K3Lg== 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=J4YLq7ad8Ku7+EWFa0/mgk39lvRv5vsUDuPSLGAmMis=; b=QnnOxpkqv+u1t8KK3xMYa9Yrr8zxinQg/TiQhXW6HKaqXwTb8YDuxcwcpMg/uSMX8C mGJXWH7TrPxXfPxxzI2Y/L9CXae1Z+GCBQseMxcC/sWEe03Qi5pKjiPRxasWZpKlpOfA 68lV9obOIVHdNEa/A8f/qVSgeBi+0l6agET/daP1o4n7GdHJvGlm1KgmO52NAulYf7E3 P1nLpLCujJSq8f3c3bUZXr0Xw/XfaKjfU+WUcxmv4hDxB40X3C+p22FHKSiSn7hI2RKm ExQRNotLtXYo9lLhlhjG59xNTkCA73A+3qYwg2te5zU3k9tDXdaU3/0G63uhAyoZT7R0 KW/Q== X-Gm-Message-State: AOAM530TkmiGvG4+pfIc07Q4Nd9IQ9Ay98/lTwLnRsug4gZmdJm6JKgD PR0cQs8nBPpItyZb3qEDKqApGXadPN4DDq3Oxuo= X-Google-Smtp-Source: ABdhPJw5Rrl8VSXS3LDJXAXOUm42CTHm9/tBMgf95ADIskpTsgsl8yCwuH0vzZ6Rb7gKkig3GTgv+diJgyCwmRsxUnA= X-Received: by 2002:aa7:c3d7:: with SMTP id l23mr9596809edr.18.1594822931168; Wed, 15 Jul 2020 07:22:11 -0700 (PDT) MIME-Version: 1.0 References: <20200629114927.17379-1-bruno.thomsen@gmail.com> <20200629114927.17379-2-bruno.thomsen@gmail.com> <20200713025246.GY21277@dragon> In-Reply-To: From: Bruno Thomsen Date: Wed, 15 Jul 2020 16:21:55 +0200 Message-ID: Subject: Re: [PATCH 2/3] ARM: dts: imx7: add support for kamstrup flex concentrator To: Fabio Estevam Cc: Shawn Guo , open list , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Herring , Pengutronix Kernel Team , NXP Linux Team , Bruno Thomsen , Mauro Carvalho Chehab Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Den tir. 14. jul. 2020 kl. 13.54 skrev Fabio Estevam : > > Hi Bruno, > > On Tue, Jul 14, 2020 at 7:03 AM Bruno Thomsen wrote: > > > I have not yet been successful in converting the deprecated properties > > to generic phy properties, so hoping I could get a hit. > > > > Kernel error messages: > > mdio_bus 30be0000.ethernet-1: MDIO device at address 1 is missing. > > Please double-check whether 1 is the correct address for the KSZ8051 > Ethernet PHY as per your schematics. Hi Fabio, Thanks for the hints. Yes, the address is correct and configured with external resistors, but just realised that I wrote the wrong device name in the comment, it's actually KSZ8081RNB. Ethernet has been working with multiple mainline kernel versions (latest being 5.7.8) for the last year or so when using the DTS in patch. So I am pretty sure hardware and setup of mux is correct'ish. Kernel trace from patch version: kernel: Micrel KSZ8081 or KSZ8091 30be0000.ethernet-1:01: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=30be0000.ethernet-1:01, irq=POLL) Error first occurs when switching from fec phy reset to mdio phy reset code path, I understand that the fec phy reset is obsolete as phy properties was wrongly added to the mac and of course should be part of the phy (separate chip). When debugging it I end up with the get_phy_device() call not working inside of_mdiobus_register_phy(). Workaround at the moment seems to be extending compatible with "ethernet-phy-id0022.1560" to disable auto detection of phy type, and then Ethernet works again. At least the same PHY driver trace can be found and full transmission speed can be used without packet errors/loss. > Are there external pull-up/pull-down resistors for strapping the > various configuration pins for the PHY? Or are the pull-up/pull-down > provided by the i.MX7D pins? Config strapping is done with external resistors. > If there are no external pull-ups, please make sure to configure the > pinctrl_enet1 accordingly, so that the Ethernet PHY address can be > properly configured and then mdio_bus driver can find it at the > correct address. > > Please check in arch/arm/boot/dts/imx6qdl-sr-som.dtsi for an example > on how to configure the Ethernet PHY pin strapping via iMX IOMUX. Thanks, good examples can be hard to find. /Bruno From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B089C433E2 for ; Wed, 15 Jul 2020 14:23:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69C712064B for ; Wed, 15 Jul 2020 14:23:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Gcg7lIS1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lCcrKo0G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69C712064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6fiBva4jTFLYlmdMQ6MfpJYnfhS7bjInE0TlTRXXgwU=; b=Gcg7lIS1R1AIJp1E/FDYF/8GX NyfvkMJNPKArNPY6QnXPPrLoB8LOjKjcDttsgZdlVVuzA3Wpp2eQbCNYuMdVEfMlawIn60Ds//Wp/ r69JS4QOZYoZmNl9tT2n8yLSZm8p9ZW4Jt++avqncYu2fBvHImrbitZj+8AzopmpgssILcyVMwoG/ 9x0ylgTg0XMxqeR+SdN9fCBkjf3jvpz3dgMVvfckcx+XpiA/X49fE1hMdrQFNGGgqrzJSD2nCgD7j ERyeQqesO/Cm6ISi5XlTympCIwNeBtRj5GBME2f/Xx17HhifMI1AeGGLWyxEkBAgOxWqlpUm8HOHN CFl43DfkQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jviIe-0008NY-0j; Wed, 15 Jul 2020 14:22:20 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jviIa-0008MG-BM for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2020 14:22:17 +0000 Received: by mail-ed1-x541.google.com with SMTP id a1so1733729edt.10 for ; Wed, 15 Jul 2020 07:22:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J4YLq7ad8Ku7+EWFa0/mgk39lvRv5vsUDuPSLGAmMis=; b=lCcrKo0G+0r8E1QGKPPSeKTD6jPE8Sc6irv4/pOM95bnJP53927eRuCyYXGeGkV9fd 4mAETYDfMMhmValjwwKkzgyw6wNRUSM7HPaYym0azD4zlCU3nckTdg4+j1Wc53w3nOHA O1x4YZWvOSoxt6Ki5XkR4PxFJ2sl5ih71h1LHgcgiViNmWv4Groshm3PXgvKN4TJT7MH 8TG+hVZ4AaNClt0XH3+2cPGeaAwLX9Nb/XP5ixDGbggf5vtZTfFJFyppqTL9x3mDCHfO b4nFyNmrOU8X1KLO5q+5txBX/3CO8n6xnjqpC15H43ua/BRMEViLX4C0QztCHodDD7LN K3Lg== 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=J4YLq7ad8Ku7+EWFa0/mgk39lvRv5vsUDuPSLGAmMis=; b=RegVeCAMFZrt76M3Mwarj1F6mW+tC14kc62XBSUzuZgxV9LmB4kdFTn82Y4qZhIdhd GmlrKlY8Q09M3LFoDh3oZqDm20qOZLgoV19MU+lzNWTosyLZXv0K9FLa5AFx5RpjietE 3LCdA5d1Sni97H+nNfwoP+Q4pNv1yHVq+2e50tX34frL0wQvqXUl0RG9o6QFsroY71NP XnCEYP3K5G1Wj3l98Es2aQT1xyQx90YBAswRQUnoasCwMDdiL5VRk2SeRRZ1KooIyeQx iPidINJWlOX0xxwulk1tuB/VvB3b7D8GR0KSe08JG0pvOdaAQTcWqVw5uSogSliTP7is bTaA== X-Gm-Message-State: AOAM533Kj04wngzWUBj/q+F13gCc3LtTzRldPfXUN+QcKurmflVwsoXZ 5gpVmphn1bYCWJILhFR2o68erdp/ieKNN3EKOzk= X-Google-Smtp-Source: ABdhPJw5Rrl8VSXS3LDJXAXOUm42CTHm9/tBMgf95ADIskpTsgsl8yCwuH0vzZ6Rb7gKkig3GTgv+diJgyCwmRsxUnA= X-Received: by 2002:aa7:c3d7:: with SMTP id l23mr9596809edr.18.1594822931168; Wed, 15 Jul 2020 07:22:11 -0700 (PDT) MIME-Version: 1.0 References: <20200629114927.17379-1-bruno.thomsen@gmail.com> <20200629114927.17379-2-bruno.thomsen@gmail.com> <20200713025246.GY21277@dragon> In-Reply-To: From: Bruno Thomsen Date: Wed, 15 Jul 2020 16:21:55 +0200 Message-ID: Subject: Re: [PATCH 2/3] ARM: dts: imx7: add support for kamstrup flex concentrator To: Fabio Estevam X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200715_102216_395346_FA231E78 X-CRM114-Status: GOOD ( 21.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Mauro Carvalho Chehab , open list , Bruno Thomsen , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Den tir. 14. jul. 2020 kl. 13.54 skrev Fabio Estevam : > > Hi Bruno, > > On Tue, Jul 14, 2020 at 7:03 AM Bruno Thomsen wrote: > > > I have not yet been successful in converting the deprecated properties > > to generic phy properties, so hoping I could get a hit. > > > > Kernel error messages: > > mdio_bus 30be0000.ethernet-1: MDIO device at address 1 is missing. > > Please double-check whether 1 is the correct address for the KSZ8051 > Ethernet PHY as per your schematics. Hi Fabio, Thanks for the hints. Yes, the address is correct and configured with external resistors, but just realised that I wrote the wrong device name in the comment, it's actually KSZ8081RNB. Ethernet has been working with multiple mainline kernel versions (latest being 5.7.8) for the last year or so when using the DTS in patch. So I am pretty sure hardware and setup of mux is correct'ish. Kernel trace from patch version: kernel: Micrel KSZ8081 or KSZ8091 30be0000.ethernet-1:01: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=30be0000.ethernet-1:01, irq=POLL) Error first occurs when switching from fec phy reset to mdio phy reset code path, I understand that the fec phy reset is obsolete as phy properties was wrongly added to the mac and of course should be part of the phy (separate chip). When debugging it I end up with the get_phy_device() call not working inside of_mdiobus_register_phy(). Workaround at the moment seems to be extending compatible with "ethernet-phy-id0022.1560" to disable auto detection of phy type, and then Ethernet works again. At least the same PHY driver trace can be found and full transmission speed can be used without packet errors/loss. > Are there external pull-up/pull-down resistors for strapping the > various configuration pins for the PHY? Or are the pull-up/pull-down > provided by the i.MX7D pins? Config strapping is done with external resistors. > If there are no external pull-ups, please make sure to configure the > pinctrl_enet1 accordingly, so that the Ethernet PHY address can be > properly configured and then mdio_bus driver can find it at the > correct address. > > Please check in arch/arm/boot/dts/imx6qdl-sr-som.dtsi for an example > on how to configure the Ethernet PHY pin strapping via iMX IOMUX. Thanks, good examples can be hard to find. /Bruno _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel