Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp579396rwd; Thu, 8 Jun 2023 05:10:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5uIa6gLMgpXJutl95wlgMdwjuIskXbrMPQMMVjs6j2uDEHM2rMc4xVecqkV8cxEDzpamfr X-Received: by 2002:a05:6a00:2403:b0:652:7b99:df30 with SMTP id z3-20020a056a00240300b006527b99df30mr9295722pfh.25.1686226258677; Thu, 08 Jun 2023 05:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686226258; cv=none; d=google.com; s=arc-20160816; b=Ok9m5ELngU9k2iPPQUe85eNHPUcfUaj76ZD0uSq59Qr+j14p3fOdQ392JjJ6rJQXuQ iPgDXoNNfvBz5/TnG7uWDTu19qOe1kIe3tsV8AJhDce7NPAhQtAH5w4Zw4lIDDq1UVkG /S4aVeTXpo5WHAS1k2p3WkK1UCQJFTkGGm8WIMU5kET+/oH1pjl1nFVMtQWJpfndwmHP OKb5MhcgtDv6a8u3Pcan4ts/IlaQ/Xphrr9ymiXrcecvS6d3z80Qz+tU1FofByNSlLxF nN41LesSCcTLNEACYRWGx4Lc2epJozrX3z0JVl4hek7XPEtnXjPyZhf59Tjszbzx+33B YJfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=2SkMNqAk7UH70mCrf6rCEtbf5pVxFJvqxBmXy14C/SQ=; b=QYmjDx5VhEoJqJYbkBN+1gersC5IoOBsKF7ViItqpQXAbwQcMWEK3YZ8ESLhZ8Dza6 0BsYlgo0moKLOlwUIrv0lh8dnqKxT3gBUv5gTl+HV4oZSe7IdHwI4R4gA09Nrh1FmK8E dcrXWVwaBFKwgjAP3YvpkWZmgabuenNcfyYuBGvBzhdIoTEzcwcSwVVGWd1a9IBo40il 1TvlNYD4KJDD0EM0rLXENGL9GPDHC0u3FjXX/xe9fKhR7UmefgBp4nV84nkJvtNY4AH/ UmjJIJHqR6yB0YclPP1yJ68Y1yp6tNeUtI1lVD/KXC2CxBMRlPVmqFsKiqRBmbZbJ/kS dQcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h184-20020a6383c1000000b00543a881db0bsi892705pge.644.2023.06.08.05.10.45; Thu, 08 Jun 2023 05:10:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236334AbjFHLnU (ORCPT + 99 others); Thu, 8 Jun 2023 07:43:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236372AbjFHLnQ (ORCPT ); Thu, 8 Jun 2023 07:43:16 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B0FCB2712; Thu, 8 Jun 2023 04:42:53 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8BxL_C8voFkyIIAAA--.1963S3; Thu, 08 Jun 2023 19:42:52 +0800 (CST) Received: from [10.20.42.35] (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxluS5voFkFHQHAA--.23621S3; Thu, 08 Jun 2023 19:42:49 +0800 (CST) Subject: Re: [PATCH v12 1/2] spi: add loongson spi bindings To: Krzysztof Kozlowski , Mark Brown , Rob Herring , Krzysztof Kozlowski , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn, zhuyinbo@loongson.cn References: <20230608072819.25930-1-zhuyinbo@loongson.cn> <20230608072819.25930-2-zhuyinbo@loongson.cn> <6ebed84c-2b42-c981-7b3f-e71cc88e4c2c@linaro.org> <4bf747c4-b767-b20c-e00f-724b50f44edb@loongson.cn> <6bfc2a22-6901-0858-7b90-bc4c52c66810@linaro.org> <11ca2b90-544d-18c2-fb15-7909ca60507f@linaro.org> From: zhuyinbo Message-ID: Date: Thu, 8 Jun 2023 19:42:49 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <11ca2b90-544d-18c2-fb15-7909ca60507f@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8DxluS5voFkFHQHAA--.23621S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023/6/8 下午6:02, Krzysztof Kozlowski 写道: > On 08/06/2023 12:00, zhuyinbo wrote: >> >> >> 在 2023/6/8 下午4:53, Krzysztof Kozlowski 写道: >>> On 08/06/2023 10:39, zhuyinbo wrote: >>>>>> >>>>>> Signed-off-by: Yinbo Zhu >>>>>> Reviewed-by: Krzysztof Kozlowski >>>>>> --- >>>>>> .../bindings/spi/loongson,ls2k-spi.yaml | 41 +++++++++++++++++++ >>>>>> MAINTAINERS | 6 +++ >>>>>> 2 files changed, 47 insertions(+) >>>>>> create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls2k-spi.yaml >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/spi/loongson,ls2k-spi.yaml b/Documentation/devicetree/bindings/spi/loongson,ls2k-spi.yaml >>>>>> new file mode 100644 >>>>>> index 000000000000..423ee851edd5 >>>>>> --- /dev/null >>>>>> +++ b/Documentation/devicetree/bindings/spi/loongson,ls2k-spi.yaml >>>>> >>>>> Filename based on compatible. >>>> >>>> >>>> There will be more ls2k series SoC spi device in the future thus I still >>>> use "loongson,ls2k-spi.yaml" for cover it. >>> >>> Add them now. >> >> >> The 2k0500 doesn't support CCF and not use CCF to gain clock and We >> internally tend to prioritize supporting 2k1000. > > Don't you refer now to drivers? Because how hardware can not support > clocks if it has them? How CCF is anyhow related to hardware? The CCF (common clock framework) driver only affects the clock parameter pass method and isn't related to clock hardware. and if dts pass a "clock-frequency" that not need a clock driver but if dts pass a "clocks" that need a clock driver. Currently, only 2k1000 has implemented a clock driver. > >> >>> >>>> >>>>> >>>>>> @@ -0,0 +1,41 @@ >>>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>>> +%YAML 1.2 >>>>>> +--- >>>>>> +$id: http://devicetree.org/schemas/spi/loongson,ls2k-spi.yaml# >>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>>> + >>>>>> +title: Loongson SPI controller >>>>>> + >>>>>> +maintainers: >>>>>> + - Yinbo Zhu >>>>>> + >>>>>> +allOf: >>>>>> + - $ref: /schemas/spi/spi-controller.yaml# >>>>>> + >>>>>> +properties: >>>>>> + compatible: >>>>>> + enum: >>>>>> + - loongson,ls2k1000-spi >>>>> >>>>> No compatibles for other devices? Didn't we have big discussion about this? >>>>> >>>>> https://elixir.bootlin.com/linux/v6.1-rc1/source/Documentation/devicetree/bindings/writing-bindings.rst#L42 >>>> >>>> >>>> There are other ls2k SPI devices compatible, such as, >>>> "loongson,ls2k0500-spi", "loongson,ls2k2000-spi" but currently I plan to >>>> add ls2k1000 spi device first, Other ls2k SoC spi device adaptation may >>>> require some additional work and I will add it later. >>> >>> Previously you claimed this serves entire family, so I don't understand >>> why you need to fix something. Why previously it was working for entire >>> family but now it does not? >> >> >> It can work was for ls2k1000 and ls2k0500 and it specifically refers to >> spi driver. but 2k0500 doesn't implementing a clock driver and doesn't > > We do not discuss here drivers, but bindings. Whatever your drivers are > not supporting, matters less. > >> use CCF to gain clock but can use "clock-frequency". Is it necessary to >> obtain a clock based on CCF? If it's necessary, then it seems that it >> can only added 2k1000 spi first. > > Not related to bindings... I may understand that what you said, and the dt-bindings only cover hardware and not involve the drivers. if so, I will add following: --- a/Documentation/devicetree/bindings/spi/loongson,ls2k-spi.yaml +++ b/Documentation/devicetree/bindings/spi/loongson,ls2k-spi.yaml @@ -16,6 +16,7 @@ properties: compatible: enum: - loongson,ls2k1000-spi + - loongson,ls2k0500-spi Thanks, Yinbo