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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D0C0BC433EF for ; Tue, 21 Jun 2022 10:13:08 +0000 (UTC) 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=g44948dzSFVzQpTKhVNJ/7fYLj0j+PWx4XRRA2W6/pU=; b=ODIKcshrFBvOPv +yAiG7UjojYsCHXU1ruiT8r8EoxyKPia6/l+IE9JRiwirbviTiSFhsKVmAXBQKkyxgjaJbUAZDX4L 7ln0wvhsGIAX5n0LsfxqELxRvJywtYIFvbl+XHoJldRDfk5n32cjJUI/M2gMIfQfGew9G5JrQ54kJ 0ONgiAygDs1vnthKM4kobciLeEAukA7twb5JR+iRoy0SJWN+Xenyn9ek4wEtiQKhrQfNCYWul+TyG v5OOx2f+UkhKa1NjJtOfMJfPdewrXOTsHJeuMbeWOjqMrkag4vWXxisHUhNKFIwcCDLD3fy+/vVYr HkRoQc1lRro5MaKn4m9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3arj-004oDL-GU; Tue, 21 Jun 2022 10:12:11 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3arg-004oCJ-Ia for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2022 10:12:10 +0000 Received: by mail-lj1-x22d.google.com with SMTP id a11so6050212ljb.5 for ; Tue, 21 Jun 2022 03:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=03Jq4PVZsTZ/X9cKBPWp0lhW/8xvAGxNyHHzAOjpF10=; b=SrLbEFS0VyflCBHWy8qxjLmADDTNnfUoB3nzHcoL08ilgAtm3iTEpGRt9pnRZ2p0Jc NAl0hV9vHjcZh7zBK/WWN+ouwfJSnLl5qihby/8yEcuSj7dcYV2Xcc1RzWy8denk//QY IJ1FXRlRgogyPjEbdLLhwOtR3d6T6xlMz1dkGYr4+0CAMqRIx8xSIZNP+S5k00G6DEa+ MBzybVFQqO5m7DZtMAhIAZWhHnknR/4buq7NuzegpZ7iLdDJLDc4B+e8McJxzeefZ6Lt TCRM+RI++A+g93b3QjctW4ykLXyJG21pA544Xmi7bYAHLoTZEq9XvOwe4A/DxKVwdis9 Z/Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=03Jq4PVZsTZ/X9cKBPWp0lhW/8xvAGxNyHHzAOjpF10=; b=guW7Mu2SRnElJtxsyoIVVlLxFB2d8IX6Eo+AxvDNkX8RcKz3NPI9OQ8yllD9ispcAO xZOf8ZTTZb2uuPQDztl12MtNQPMQDZTYO0oldWuaiHUzmPlj/5YggRnU5my0AZlpyj8N QjAbVCUWEBWVM/vXFo1uLVP7egSss4A8nFZyAER8jUEvvg/bX00EvdJQbawLlJ6yT6TH /R40k0SGjKQGUJvQ/HOi8B7BPjvL7rEzhvONlM9sPvVP8Mi2fvf3mdwaXthZiLyOdQzl S3mbdf3HOcRyuLXAL0WVMSxoqUwrIYqVQOvMG904cKBEmCqGvDmzWa/bHVtitfG/vG5A YKOg== X-Gm-Message-State: AJIora99rVeh1Ldgjc78Dp74B/U1P+5PQTlslV/w5tsv3u9M++kSXFG2 /0b91xZ2sD0qVnaoNx6zg/M= X-Google-Smtp-Source: AGRyM1u7isDdRU5wiug9yDoKlpD2Z75vXUFB9x/5E1nRK+BG/iJsMKUrjIJsxTzMAKvUaZBI1V8dsg== X-Received: by 2002:a2e:9246:0:b0:25a:6c6a:10ce with SMTP id v6-20020a2e9246000000b0025a6c6a10cemr5393309ljg.501.1655806322381; Tue, 21 Jun 2022 03:12:02 -0700 (PDT) Received: from mobilestation ([95.79.189.214]) by smtp.gmail.com with ESMTPSA id u5-20020ac258c5000000b0047f71e4b0e5sm69225lfo.255.2022.06.21.03.12.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 03:12:01 -0700 (PDT) Date: Tue, 21 Jun 2022 13:11:59 +0300 From: Serge Semin To: Krzysztof Kozlowski Cc: Brad Larson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, adrian.hunter@intel.com, alcooperx@gmail.com, andy.shevchenko@gmail.com, arnd@arndb.de, blarson@amd.com, brijeshkumar.singh@amd.com, catalin.marinas@arm.com, gsomlo@gmail.com, gerg@linux-m68k.org, krzysztof.kozlowski+dt@linaro.org, lee.jones@linaro.org, broonie@kernel.org, yamada.masahiro@socionext.com, p.zabel@pengutronix.de, piotrs@cadence.com, p.yadav@ti.com, rdunlap@infradead.org, robh+dt@kernel.org, samuel@sholland.org, suravee.suthikulpanit@amd.com, thomas.lendacky@amd.com, ulf.hansson@linaro.org, will@kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v5 04/15] dt-bindings: spi: dw: Add AMD Pensando Elba SoC SPI Controller bindings Message-ID: <20220621101159.stvan53rvr6qugna@mobilestation> References: <20220613195658.5607-1-brad@pensando.io> <20220613195658.5607-5-brad@pensando.io> <20220620193044.ihxfn6kddif7j5la@mobilestation> <0a68aa72-df85-cf78-dcca-2d75038234c6@kernel.org> <20220620200445.yew3vo3pnjhos7rs@mobilestation> <4ff85493-665a-ee58-07d3-80178c49223b@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4ff85493-665a-ee58-07d3-80178c49223b@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220621_031208_676716_7116AC94 X-CRM114-Status: GOOD ( 28.59 ) 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="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 On Tue, Jun 21, 2022 at 09:00:36AM +0200, Krzysztof Kozlowski wrote: > On 20/06/2022 22:04, Serge Semin wrote: > > On Mon, Jun 20, 2022 at 09:46:25PM +0200, Krzysztof Kozlowski wrote: > >> On 20/06/2022 21:30, Serge Semin wrote: > >>> On Mon, Jun 13, 2022 at 12:56:47PM -0700, Brad Larson wrote: > >>>> From: Brad Larson > >>>> > >>>> The AMD Pensando Elba SoC has integrated the DW APB SPI Controller > >>>> > >>>> Signed-off-by: Brad Larson > >>>> --- > >>>> Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml | 2 ++ > >>>> 1 file changed, 2 insertions(+) > >>>> > >>>> diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml > >>>> index e25d44c218f2..2a55b947cffc 100644 > >>>> --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml > >>>> +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml > >>>> @@ -73,6 +73,8 @@ properties: > >>>> - renesas,r9a06g032-spi # RZ/N1D > >>>> - renesas,r9a06g033-spi # RZ/N1S > >>>> - const: renesas,rzn1-spi # RZ/N1 > >>> > >>>> + - description: AMD Pensando Elba SoC SPI Controller > >>>> + const: amd,pensando-elba-spi > >>> > >>> Not enough. The driver requires to have a phandle reference to the > >>> Pensando System Controller. So the property like > >>> "amd,pensando-elba-syscon" is also needed to be added to the DT schema > >>> otherwise should the dt-schema tool correctly handle the > >>> "unevaluatedProperties: false" setting (Rob says it isn't fully > >>> supported at the moment), the dtbs_check procedure will fail on your > >>> dts evaluation. > >> > > > >> The property was here before, now removed, so I assume it was also > >> removed from the driver and DTS. Isn't that the case? > > > > Ah, the property has been indeed removed. The driver now searches for > > the system controller by the next compatible string: > > "amd,pensando-elba-syscon" using the > > syscon_regmap_lookup_by_compatible() method. My mistake. Sorry for the > > noise. > > > > * Though personally I'd prefer to have a property with the phandle > > reference in order to signify the connection between the system controller > > and the SPI-controller. Otherwise the implicit DT bindings like having > > the "amd,pensando-elba-syscon"-compatible syscon gets to be > > hidden behind the DT scene. But seeing we have already got the Microsemi > > platform with such semantic, I can't insist on fixing this. > > I agree entirely, this should be explicit syscon-type property. Looking > up for compatibles: > - creates hidden (not expressed via bindings) dependency between nodes, > - is not portable and several people struggled with it later and needed > backward-compatible code (many examples, let's just give recent one: [1]) > > > [1] > https://lore.kernel.org/all/20220619151225.209029-10-tmaimon77@gmail.com/ Seems even more reasonable now. Thanks for providing a bright example justifying the property-based approach. @Brad, could you get back the property with a phandle to the syscon DT-node? (No need in adding the CS CSR address as the phandle argument, just a phandle.) -Sergey > > > Best regards, > Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel