Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3092893rdh; Mon, 27 Nov 2023 06:25:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDiaaALFoDS7G/l/wy0Ria+u6JJh3HVYYK7myQlRdMbpMdU23rHECoixxnkQfqjHknXXRJ X-Received: by 2002:a17:902:d489:b0:1cf:6e9e:aa19 with SMTP id c9-20020a170902d48900b001cf6e9eaa19mr12538509plg.7.1701095102580; Mon, 27 Nov 2023 06:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701095102; cv=none; d=google.com; s=arc-20160816; b=OnOfa6lnhhUK3hZevKQv4U/nnm2RIy7V/IATKr5NfSzuecl8qwqE+ps/ghoij1EKti s0JN/xxFGtFJoFZrmgGHI57YHE92rXLksmrc2s/b6sc/kXsp5noZWwbkodVNL7QqwgRC ZueDa3hvPmWi9/2VDucvgYT/2jUNl8HNNnztZSdQOtAnVN7HlSCKpjpCrCDaIVxPA1Sc qqrixAi0A86zzZg/3g4qp2C0R1lz5Ca0s1cv3dIMJOSctzz2lnnQusb4x0fYmcpSnSWc bPMQiuOTOdNYdvd1urFVPgXXAT9VAd7km/f5FvBGdPyI8jD9lo/5QIQFm+/3palNhsPi tdxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Uh8MG/fcScS4zGx1w1Y666LV3WqtJtCJW99b8yZPGeU=; fh=T3DHuA7AoQucbSf7mTzTTBhkgM7QT36HhmX9iK9qnUI=; b=CogEBWqvqSBhC6C5vU0Ii595ijvsl1/bdytv6S62tLBUGfYG6wY+as5QGkZQBT9727 v7Vv7aFONi3CwwfHx/kpOjpwZcxoOSYwTzvItlg//THkxK978+uO+Hzj0oReFVS7x15i jss5Ju3anKQGXusEdTK6exza4dKjKZ/ALGMfPGvL0aa1llCWm5P980WeY+7IA3yD5hzj JYoQl2KF+yaBlcJ5ALHmZ3GQ6FqoLliPTjpK8BId6QDGSGva/Z7BahskoTDyFgolQmsZ 4Fs4G94vWxPoGjkyXzn6t6mc1phwGsarKFD1vgoVK5sHjHvcpOjNVjyX3ZpqrgpZo3se YI3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ferroamp-se.20230601.gappssmtp.com header.s=20230601 header.b=lvw+6FxY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id jl23-20020a170903135700b001cf6453b25esi9328784plb.543.2023.11.27.06.25.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:25:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@ferroamp-se.20230601.gappssmtp.com header.s=20230601 header.b=lvw+6FxY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 01B8C808D204; Mon, 27 Nov 2023 06:25:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233805AbjK0OYn (ORCPT + 99 others); Mon, 27 Nov 2023 09:24:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233749AbjK0OYS (ORCPT ); Mon, 27 Nov 2023 09:24:18 -0500 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D564230 for ; Mon, 27 Nov 2023 06:02:43 -0800 (PST) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-507ad511315so5892921e87.0 for ; Mon, 27 Nov 2023 06:02:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ferroamp-se.20230601.gappssmtp.com; s=20230601; t=1701093762; x=1701698562; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Uh8MG/fcScS4zGx1w1Y666LV3WqtJtCJW99b8yZPGeU=; b=lvw+6FxYVAJcVDXhAwCe/s9ZxNHS8sF1SM/r+F8nmyCxt6kggKelzzoVhdrYZypeGh ZUrPlACn2bhGk/rchjr6SSV5u5KgvbkMR5AVxEk2vG8YmK6qc460vKxl5jxXdZRQg2yq VzOO+lmVMmU7F2py/GETYiesAsPCKaXiA2FdQoPr3Mp2zJKOtGx4dLxDaC4ZPV7R2X9y x3zy0X+wPtx9H7N986+Ie20LJDu3lX2AVrxtBi4l2xOHeG9M/nKyEvsU5BDT2Nl223J+ HT2YcZ5m1KC6818QSROQFoDBaBgTy+BRGInPT0bEDNXR9/YBiC6/0yUD84abdeDn2nrK L5bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701093762; x=1701698562; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Uh8MG/fcScS4zGx1w1Y666LV3WqtJtCJW99b8yZPGeU=; b=oggHzDtfq2O2yVlM+wRHkSjFleaVnd26wkqIQWFVlEItJ8rezO2uihFhjkvaxEMwQ6 GjpDNc1bwv3u/MYZTyAA3VDP1qEldxOF3kVNOzb5DCvEkdDxUI5cUG4RI5bimlykvKmp LX2l0vWIMyy6v6u36WRJgipsv3/oh0zJ5QWCdWkG7Pmvt0J6CeE3/VGlDHCejdwvlo5N hV04tYVhn53WSua7dbTolFonMFM+YlAEZ1dmmT32ErQH22tsITGPTUw3ju2CfmAofDyz XSVsxuwShVGY/aEJwdO9P/Fk+VIqEc0zqUhLOqzuKoLr9WW9w0j7Cv5iif8XUuu2feW4 ta4w== X-Gm-Message-State: AOJu0Yz5ktf2p1GroLW+PSf6RaQHzuIGw4khfE7iKoH/EuRGxyYNsxZW HZnmBdjHDSIlXLY8XbDZVani5A== X-Received: by 2002:a05:6512:2389:b0:506:899d:1994 with SMTP id c9-20020a056512238900b00506899d1994mr7071586lfv.52.1701093761408; Mon, 27 Nov 2023 06:02:41 -0800 (PST) Received: from debian ([185.117.107.42]) by smtp.gmail.com with ESMTPSA id u4-20020a056512128400b0050ab696bfaasm1486122lfs.3.2023.11.27.06.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:02:40 -0800 (PST) Date: Mon, 27 Nov 2023 15:02:39 +0100 From: =?iso-8859-1?Q?Ram=F3n?= Nordin Rodriguez To: Andrew Lunn Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] net: microchip_t1s: add support for LAN867x Rev.C1 Message-ID: References: <20231127104045.96722-1-ramon.nordin.rodriguez@ferroamp.se> <20231127104045.96722-3-ramon.nordin.rodriguez@ferroamp.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 06:25:00 -0800 (PST) On Mon, Nov 27, 2023 at 02:37:41PM +0100, Andrew Lunn wrote: > > #define PHY_ID_LAN867X_REVB1 0x0007C162 > > +#define PHY_ID_LAN867X_REVC1 0x0007C164 > > So there is a gap in the revisions. Maybe a B2 exists? The datasheet lists A0, B1 and C1, seems like Microchip removes the application notes for old revisions, so no way that I can see to add the init-fixup for A0. I'm guessing there is a rev.c0 that was never released to the public. > > + const u16 magic_or = 0xE0; > > + const u16 magic_reg_mask = 0x1F; > > + const u16 magic_check_mask = 0x10; > > Reverse christmass tree please. Longest first, shorted last. My bad, I was just thinking 'christmas tree' forgot about the reverse. I'll fix that. > > + int err; > > + int regval; > > + u16 override0; > > + u16 override1; > > + const u16 override_addr0 = 0x4; > > + const u16 override_addr1 = 0x8; > > + const u8 index_to_override0 = 2; > > + const u8 index_to_override1 = 3; > > Same here. I'll fix this. > > > + > > + err = lan867x_wait_for_reset_complete(phydev); > > + if (err) > > + return err; > > + > > + /* The application note specifies a super convenient process > > + * where 2 of the fixup regs needs a write with a value that is > > + * a modified result of another reg read. > > + * Enjoy the magic show. > > + */ > > I really do hope that by revision D1 they get the firmware sorted out > so none of this undocumented magic is needed. > > Andrew Really do hope so..