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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 DF245C43217 for ; Thu, 9 Sep 2021 12:35:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8B21610FF for ; Thu, 9 Sep 2021 12:35:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351145AbhIIMgU (ORCPT ); Thu, 9 Sep 2021 08:36:20 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:34342 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352756AbhIIMdI (ORCPT ); Thu, 9 Sep 2021 08:33:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=48ceJVAoRguaw2L3yNwORR8qHrMqT0LzCZJp/ceEfGc=; b=Lo Etph24tiJGxwO6/rHMNteoN14An5qk/BOoUwSDIPazZHRXBMIviBdUq9pc8XJvAPRXGRE7iB5D7AY THmdH2PHUzKCTcslm1b+rpmRJN7Dw1H73GQnB297nJ5ff4TuV+krRsS370YmBYIVMV1lZ9xjBRhxH 43CTbE4MbncpSFQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mOJDa-005u8e-3V; Thu, 09 Sep 2021 14:31:50 +0200 Date: Thu, 9 Sep 2021 14:31:50 +0200 From: Andrew Lunn To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Gregory CLEMENT , Jason Cooper , Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH] ARM: dts: armada-{370,xp}: drop "marvell,orion-spi" from SPI controllers Message-ID: References: <20161207152109.17545-1-uwe@kleine-koenig.org> <87eg1jhi4l.fsf@free-electrons.com> <20161207154145.yr2iua73xnoyjsse@pengutronix.de> <20210909075005.fxy4vfarrvnmr6ez@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210909075005.fxy4vfarrvnmr6ez@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Sep 09, 2021 at 09:50:05AM +0200, Uwe Kleine-König wrote: > Hello, > > On Wed, Dec 07, 2016 at 04:41:45PM +0100, Uwe Kleine-König wrote: > > Hello Gregory, > > > > On Wed, Dec 07, 2016 at 04:30:02PM +0100, Gregory CLEMENT wrote: > > > On mer., déc. 07 2016, Uwe Kleine-König wrote: > > > > > > > From: Uwe Kleine-König > > > > > > > > The SPI controllers on Armada 370 and XP differ from the original Orion > > > > SPI controllers (at least) in the configuration of the baud rate. So > > > > it's wrong to claim compatibility which results in bogus baud rates. > > > > > > Until two years ago with the commits > > > df59fa7f4bca9658b75f0f5fee225b3a057475c5 and > > > 4dacccfac69494ba70248b134352f299171c41b7 > > > we used "marvell,orion-spi" compatible on Armada XP and Armada 370 > > > without any problem. > > > > > > The new compatible "marvell,armada-xp-spi" and "marvell,armada-xp-spi" > > > allows to have more choice for the baudrate for a given clock but it is > > > not true that Armada 370 and Armada XP are not compatible with > > > "marvell,orion-spi". > > > > The issue I was faced with that made me create this patch is that in > > barebox no special case for 370/XP was active. The result was that a > > device that could be operated at 60 MHz only got a clock of 11 MHz and > > the driver assumed it configured 41.666 MHz. I didn't check if the same > > can happen in the opposite direction (or if there are other important > > incompatibilities) but still I'd say this is a bug with my patch being > > the obvious fix. > > I just found this patch in an old branch and wonder what do to with it. > It still applies fine at least. > > (If the original patch already disappeared from your inbox, it can be > found at https://lore.kernel.org/r/20161207152109.17545-1-uwe@kleine-koenig.org/ ) If you remove "marvell,orion-spi" you are going to break running a new DT blob on an old kernel. The compatible list is supposed to be most specific to most generic in order. So "marvell,orion-spi" is the fall back option for Armada, you don't get all the features, but it should work at a basic level. And in this case, barebox did its best, it gave you a working but unexpectedly slow bus. If you take away "marvell,orion-spi", and there is no support for "marvell,armada-xp-spi" and "marvell,armada-xp-spi" in barebox, does that not then mean there is no SPI support at all? Andrew 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 71B64C433EF for ; Thu, 9 Sep 2021 13:36:05 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4222061059 for ; Thu, 9 Sep 2021 13:36:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4222061059 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=q60BVhx72gch+WuKTJ6OL2ELAB4RqDe2847a+gFB+C8=; b=ofthsHMTiXsVXp 6ihBpFVEl5MVqdBkxHlBoVoYqH2hOAPkMkuu2DrmcbMJvPEpZDKsKF/eGQ/qM7VG0Eh6acbbdMsKA MmrutsAyu0LlkTPNlGm4ZPS8GBv8Vvmszr1UfFQnqjcZrC06Nxl6uZeGetPHQ43xUyhtdWLdy0LWZ uv2VMyCZgobvl/U7ZtmZCWjlfhalcjzkSj8QUdGbf+MtVh3dvE9cgvIRiQ0deVf06iuOlSOH8DmXN o7fuM3qAKYkxl14pTVshNmpyCUJz8WyhXY6615rv5jB5dhSRkQfrPkO7avk3a7UoczxLiy68kYB77 kKtJ+4LbUw2c9sQHITDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOKBT-009uTA-Dm; Thu, 09 Sep 2021 13:33:45 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOJDi-009S5L-7w for linux-arm-kernel@lists.infradead.org; Thu, 09 Sep 2021 12:32:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=48ceJVAoRguaw2L3yNwORR8qHrMqT0LzCZJp/ceEfGc=; b=Lo Etph24tiJGxwO6/rHMNteoN14An5qk/BOoUwSDIPazZHRXBMIviBdUq9pc8XJvAPRXGRE7iB5D7AY THmdH2PHUzKCTcslm1b+rpmRJN7Dw1H73GQnB297nJ5ff4TuV+krRsS370YmBYIVMV1lZ9xjBRhxH 43CTbE4MbncpSFQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mOJDa-005u8e-3V; Thu, 09 Sep 2021 14:31:50 +0200 Date: Thu, 9 Sep 2021 14:31:50 +0200 From: Andrew Lunn To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Gregory CLEMENT , Jason Cooper , Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH] ARM: dts: armada-{370, xp}: drop "marvell, orion-spi" from SPI controllers Message-ID: References: <20161207152109.17545-1-uwe@kleine-koenig.org> <87eg1jhi4l.fsf@free-electrons.com> <20161207154145.yr2iua73xnoyjsse@pengutronix.de> <20210909075005.fxy4vfarrvnmr6ez@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210909075005.fxy4vfarrvnmr6ez@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210909_053158_384311_D6EE9571 X-CRM114-Status: GOOD ( 34.17 ) 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: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 09, 2021 at 09:50:05AM +0200, Uwe Kleine-K=F6nig wrote: > Hello, > = > On Wed, Dec 07, 2016 at 04:41:45PM +0100, Uwe Kleine-K=F6nig wrote: > > Hello Gregory, > > = > > On Wed, Dec 07, 2016 at 04:30:02PM +0100, Gregory CLEMENT wrote: > > > On mer., d=E9c. 07 2016, Uwe Kleine-K=F6nig = wrote: > > > = > > > > From: Uwe Kleine-K=F6nig > > > > > > > > The SPI controllers on Armada 370 and XP differ from the original O= rion > > > > SPI controllers (at least) in the configuration of the baud rate. So > > > > it's wrong to claim compatibility which results in bogus baud rates. > > > = > > > Until two years ago with the commits > > > df59fa7f4bca9658b75f0f5fee225b3a057475c5 and > > > 4dacccfac69494ba70248b134352f299171c41b7 > > > we used "marvell,orion-spi" compatible on Armada XP and Armada 370 > > > without any problem. > > > = > > > The new compatible "marvell,armada-xp-spi" and "marvell,armada-xp-spi" > > > allows to have more choice for the baudrate for a given clock but it = is > > > not true that Armada 370 and Armada XP are not compatible with > > > "marvell,orion-spi". > > = > > The issue I was faced with that made me create this patch is that in > > barebox no special case for 370/XP was active. The result was that a > > device that could be operated at 60 MHz only got a clock of 11 MHz and > > the driver assumed it configured 41.666 MHz. I didn't check if the same > > can happen in the opposite direction (or if there are other important > > incompatibilities) but still I'd say this is a bug with my patch being > > the obvious fix. > = > I just found this patch in an old branch and wonder what do to with it. > It still applies fine at least. > = > (If the original patch already disappeared from your inbox, it can be > found at https://lore.kernel.org/r/20161207152109.17545-1-uwe@kleine-koen= ig.org/ ) If you remove "marvell,orion-spi" you are going to break running a new DT blob on an old kernel. The compatible list is supposed to be most specific to most generic in order. So "marvell,orion-spi" is the fall back option for Armada, you don't get all the features, but it should work at a basic level. And in this case, barebox did its best, it gave you a working but unexpectedly slow bus. If you take away "marvell,orion-spi", and there is no support for "marvell,armada-xp-spi" and "marvell,armada-xp-spi" in barebox, does that not then mean there is no SPI support at all? Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel