From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AADD615AADA for ; Tue, 2 Apr 2024 18:10:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712081414; cv=none; b=J1aMJyACSZrx3UPYiC8iX7wmPqYRWh/32wbQf9mqb/2UYVYZHf4b6SpLhNaBL4YGpu3W96PSVIsbDYwq0a5+aWgbZe2mlouhCAk6tLl17lEjY4ceTinjyOB+e9qiEkHpA44xzLKSODrKgJ6h9VvNZB77FF5eLBEPilj1i3Y3vQU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712081414; c=relaxed/simple; bh=pYljYIHEkrkB0y2SZHC4nd7FMIFEzU0dyq95rjDG54E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HuUmzBcAnpa/FipGMO+X4+G5IQ4Quy4hLPz+QDMzRYLJCXmz2uMgJOJ0/3/KT3Iola2YH76H7pqLQIgdA+Xn5OWDBItw/Gwf7N9WyxcLMuZ1hU59z1L/5r37NnXMxBsw9U2n20dJNZsRdFVqQaH8d3UrhDVgiSMs8AQvD9aQJzk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jThfPFJR; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jThfPFJR" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a4644bde1d4so741711266b.3 for ; Tue, 02 Apr 2024 11:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712081411; x=1712686211; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=ARUpyGW+whw3wu4AP9U6adEupqnhQBlQNpDXlmMdSY0=; b=jThfPFJRxt+Aw0BqwV8YBb8TRBofcAazXiES3brutRbLY/p2EY6h5rGLsjwcjGR+IQ C7DB3guF98MvilGb7X+nBVobUruXlhM6sPVoZ9rGtzLeCLRWECqlXTKnlsoQE/HsTqGS bH8sqQk/YbTp1Kx9yx52l5S5WZSQ9cspVW3n2QakmeKru4h70ObtGT9x4Cob7cveuZ2w +fQnvzYiqPbStP1TMsHOASLuaP+Slh7c/Q+oEOy7cg6LfmJTiTsSNorOQpjRkWCeHltx giWjbSYqE9WG1zUQM+WHuJSiCjTTNQZJPt7zY7qt9MQkkvqB8t4Yv/wHuut8z4xHV6ls 6WFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712081411; x=1712686211; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ARUpyGW+whw3wu4AP9U6adEupqnhQBlQNpDXlmMdSY0=; b=G6Du49p95T3iAZ6uC9X/rGD5cOQxO3zqnFRxRdLlnDcsdGLybnNYBJBurjK38+Gkwb 54gQ6RNrskaPlpueUqSbz2lhX/2C39rlspBSVOsUWlOTGUe3hyam4DyVrlJR32HLAQ++ zAWc7JyhPFiXGdQTznxE+vVCulZ1Y3Z58Ony+t6lNCk+Yz8pzRiw6Vf0xDLIBnh7IB3m UCF76ZT5iTquQOXwb5HVD0G7pVqfZDo40x0vjYkKLifHrrmI0dW3ozxgENu8NaanzUfG 6B3ONrXiKUBTyMubrGoxQ+Fu9+bM+IhIuhpPwABFFLgHalNHj/ptRYo0qefekY0jXvaT S+Lw== X-Forwarded-Encrypted: i=1; AJvYcCX2XRUnTQwjF+mezDbXuakncEl/QwGu58BE6wV1p6enMWjDk25rq0GWhx2xkhuNGCisPVukxvGwyYm4GL8jq515lltshjJAxXQoEA== X-Gm-Message-State: AOJu0Yyh6SeNfa6wupKPfiWhoHvc/TiWLHucmh2U1gxk2tv8888tCfEO X0lt7BUR86ywIQc0o3hrxDfN6kaSK68T5poJw1ryKq92xDa7d8HqJeWknqSxEjk= X-Google-Smtp-Source: AGHT+IHSP4fR1R0ef5NKvhwzZ2Rs/bUsT9d2lAYc7KlN1gQx64hA12/tzuBXLZhD6muavsWv9DHM5w== X-Received: by 2002:a17:906:b28b:b0:a4e:5fe8:46bd with SMTP id q11-20020a170906b28b00b00a4e5fe846bdmr4519827ejz.51.1712081410976; Tue, 02 Apr 2024 11:10:10 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id l3-20020a1709067d4300b00a466af74ef2sm6790403ejp.2.2024.04.02.11.10.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Apr 2024 11:10:10 -0700 (PDT) Message-ID: <65b6329a-643c-4adf-9137-281964865d51@linaro.org> Date: Tue, 2 Apr 2024 20:10:08 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 17/18] dt-bindings: pci: rockchip,rk3399-pcie-ep: Add ep-gpios property To: Damien Le Moal , Manivannan Sadhasivam , Lorenzo Pieralisi , Kishon Vijay Abraham I , Shawn Lin , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Heiko Stuebner , linux-pci@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Rick Wertenbroek , Wilfred Mallawa , Niklas Cassel References: <20240330041928.1555578-1-dlemoal@kernel.org> <20240330041928.1555578-18-dlemoal@kernel.org> <518f04ea-7ff6-4568-be76-60276d18b209@linaro.org> <49ecab2e-8f36-47be-a1b0-1bb0089dab0f@kernel.org> <57d5d6ea-5fef-423c-9f85-5f295bfa4c5f@linaro.org> <80c4c37b-8c5c-4628-a455-fcccfc3b3730@kernel.org> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So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ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 02/04/2024 09:55, Damien Le Moal wrote: > On 4/2/24 16:38, Damien Le Moal wrote: >> On 4/2/24 16:33, Krzysztof Kozlowski wrote: >>> On 02/04/2024 01:36, Damien Le Moal wrote: >>>> On 4/1/24 18:57, Krzysztof Kozlowski wrote: >>>>> On 01/04/2024 01:06, Damien Le Moal wrote: >>>>>> On 3/30/24 18:16, Krzysztof Kozlowski wrote: >>>>>>> On 30/03/2024 05:19, Damien Le Moal wrote: >>>>>>>> From: Wilfred Mallawa >>>>>>>> >>>>>>>> Describe the `ep-gpios` property which is used to map the PERST# input >>>>>>>> signal for endpoint mode. >>>>>>>> >>>>>>>> Signed-off-by: Wilfred Mallawa >>>>>>>> Signed-off-by: Damien Le Moal >>>>>>>> --- >>>>>>>> .../devicetree/bindings/pci/rockchip,rk3399-pcie-ep.yaml | 3 +++ >>>>>>>> 1 file changed, 3 insertions(+) >>>>>>>> >>>>>>>> diff --git a/Documentation/devicetree/bindings/pci/rockchip,rk3399-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/rockchip,rk3399-pcie-ep.yaml >>>>>>>> index 6b62f6f58efe..9331d44d6963 100644 >>>>>>>> --- a/Documentation/devicetree/bindings/pci/rockchip,rk3399-pcie-ep.yaml >>>>>>>> +++ b/Documentation/devicetree/bindings/pci/rockchip,rk3399-pcie-ep.yaml >>>>>>>> @@ -30,6 +30,9 @@ properties: >>>>>>>> maximum: 32 >>>>>>>> default: 32 >>>>>>>> >>>>>>>> + ep-gpios: >>>>>>>> + description: Input GPIO configured for the PERST# signal. >>>>>>> >>>>>>> Missing maxItems. But more important: why existing property perst-gpios, >>>>>>> which you already have there in common schema, is not correct for this case? >>>>>> >>>>>> I am confused... Where do you find perst-gpios defined for the rk3399 ? >>>>>> Under Documentation/devicetree/bindings/pci/, the only schema I see using >>>>>> perst-gpios property are for the qcom (Qualcomm) controllers. >>>>> >>>>> You are right, it's so far only in Qualcomm. >>>>> >>>>>> The RC bindings for the rockchip rk3399 PCIe controller >>>>>> (pci/rockchip,rk3399-pcie.yaml) already define the ep-gpios property. So if >>>>> >>>>> Any reason why this cannot be named like GPIO? Is there already a user >>>>> of this in Linux kernel? Commit msg says nothing about this, so that's >>>>> why I would expect name matching the signal. >>>> >>>> The RC-mode PCIe controller node of the rk3399 DTS already defines the ep-gpios >>>> property for RC side PERST# signal handling. So we simply reused the exact same >>>> name to be consistent between RC and EP. I personnally have no preferences. If >>>> there is an effort to rename such signal with some preferred pattern, I will >>>> follow. For the EP node, there was no PERST signal handling in the driver and >>>> no property defined for it, so any name is fine. "perst-gpios" would indeed be >>>> a better name, but again, given that the RC controller node has ep-gpios, we >>>> reused that. What is your recommendation here ? >>> >>> Actually I don't know, perst and ep would work for me. If you do not >>> have code for this in the driver yet (nothing is shared between ep and >>> host), then maybe let's go with perst to match the actual name. >> >> That works for me. The other simple solution would be to move the RC node >> ep-gpios description to the common schema pci/rockchip,rk3399-pcie-common.yaml, >> maybe ? Otherwise, perst-gpios like the Qualcomm schemas would be nice too. > > Thinking more about this, I think moving the ep-gpios description to the common > schema is the right thing to do given that the driver uses common code between > RC and EP to get that property. But if that is not acceptable, I can rename it > and get that property in the controller EP mode initialization code. That will > be add a little more code in the driver. I forgot that it is actually the same hardware, so if host has "ep-gpios" already then EP mode should have the same property. Common schema is good idea. Best regards, Krzysztof