From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 044F81BD9D0 for ; Sun, 9 Feb 2025 12:21:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739103694; cv=none; b=iTMVlxSxqLYPzrc9vEwgFkCtYTPoOJiiAqMkBgIiFXB7ZNca0OSM2f3RsdaHMY2vLCgHYqj0i/btwWjS83B2Cn7q63UAH0IyUIe9O2USbEZyJZtbg6RlWHWj2fyG92YEFafbwyYinwyJvUdZ3TGzHLluUy1oIxBoaS/z2I0TzPo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739103694; c=relaxed/simple; bh=ph522qAR9+PUsOaPfzHWCTEdwHBrtqLkGYkPw9T6Uks=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=c7iX0+ewIss9f0Uxz+K7cB33FIs+EyE2WRGBD1bAV/FhXJjHXE0ywwN2woBD7PKgclywpPQAm47u5WmjV0Hs6mVxBf7GNs0GCCcNV96j4Ho/v+pWpjPAFtMOhhFG0ahrvrJG/kBqvwL74m8oBWHxWor0UpY7S3nIrORo182CJ/o= 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=NBtLQtY+; arc=none smtp.client-ip=209.85.221.43 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="NBtLQtY+" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-38c5ba0be37so158710f8f.2 for ; Sun, 09 Feb 2025 04:21:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739103690; x=1739708490; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=VDaiKVIvoDREmF5dBkk40+XBWsu5AZxMK34kj8iTAes=; b=NBtLQtY+28M+pc1U48erm0+RC0qKSBp+gKgD+IswzekxfNERq1wPBv60QtKBDwuD0T 52Wyd2nNZqy++pMWUdaPw8/l3phyK3ZbWAno0BCBSOCJNP/2JVasELWJ2/ssg15RwDrA xEw279fIE7do9aRCzjhSYDvL2QO7rzazIPzpsFKLv3c98xlBlW6wBTSmGNHMBuVI25VN rEJa87YC03DskyrB3H/CUCTdFKWpWQ0GuxpxuIE5I7KF/9GscJr53mDJjkhrR5nM6nJL qMzrWlWMrFucYO+QXVGtwFRwGxEwBNZX6/Vkq9CV/BmsYRjb/80e5FdHj/6frweL5sAb Ynlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739103690; x=1739708490; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from: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=VDaiKVIvoDREmF5dBkk40+XBWsu5AZxMK34kj8iTAes=; b=vfFvFOxVlVbowHw/Vd7YwSI3ns/aV4wVzCe6l1fBB/ylfKRFtcQkHvd9QRPR9xtnrE vHppNQ+++mEIRQI0QuepIy9IDJW8C+XXqmtslOqD63ZEozsF4VZTXy0fNGmfxEQT3DfQ i6guBFVFT4fUMWCKUktWVP+5bM05qfQHo9MzPo46HyowXzywnos79U70Is4CrP9iRbUA so+vxb9s6Px623UJPuhwRSy3C7lpWXlTEcU3fnuNVaY4mVv5SO4uQyBnqcRgMZLtjj4w 5Sw/0eOCjMEa4E3yc8Mpl9TILQjfrgdX0MKYFb+3WwSjX1XV2K8P9oGFo6ZM3EU7QLKt KMLA== X-Forwarded-Encrypted: i=1; AJvYcCW772Y3bLpxEVmm3pT1v7l3CTgeKBnYCgOcM9VvTmzw/ObKoBfyhxWuJki4FfwjhH2B00lQhFNRFL3J@vger.kernel.org X-Gm-Message-State: AOJu0YxvcvtQUTw4Ek+gPxrv/ENrsNsfUbjxhPOy8DqrJZmrY6Wx2ckT 1VwcUeRpsxQC3L88icxc6rhxgrfYUZlehM4nd5j1oMGcEwk69AHZ8yBmCWkQS20= X-Gm-Gg: ASbGncvR6K825tdr+ABkQFc7uJHDcqdL2Rrb720LDqTxICoeddVXlrLgvY6IGqdZaUw 1EQ1z8sejdesdarmNpWQn3SLwg6vonXrNMvJZuz+WXCUQnRMAyQ4KB1VRdkpTDCJhbJI+8+jT0L Pel3PSG91tywno65l+7HDtPg2dyp7aGqO+A3wz8/lSB/V3uyMbxJtD7as7qgZw93EnczDwU9HXu Xml4WuTrIjCfmi2DlvSOY+NcIMe9/hRO2q02cXZWa03Ut2JQm+1QDtEGZqQAYITFrByojo54XMN q/wjB3pcMib7AyZy/CSrbFdo/ZQr4sMZdhU= X-Google-Smtp-Source: AGHT+IFuXsp9sstavdPA9gOZO+V3HNaUNGICg6DdYxO+seNxQN7zlceF78JaHywilg98L3EI8R1dTA== X-Received: by 2002:a05:6000:1f84:b0:38b:f3a4:4e15 with SMTP id ffacd0b85a97d-38dc8dc7e9emr2649978f8f.4.1739103690201; Sun, 09 Feb 2025 04:21:30 -0800 (PST) Received: from [192.168.1.20] ([178.197.218.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dc5e6f027sm7763436f8f.4.2025.02.09.04.21.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 Feb 2025 04:21:29 -0800 (PST) Message-ID: Date: Sun, 9 Feb 2025 13:21:27 +0100 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 2/5] dt-bindings: mfd: syscon: Add ti,am62-ddr-pmctrl To: Markus Schneider-Pargmann Cc: Andrew Davis , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Siddharth Vadapalli , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20250122-topic-am62-dt-syscon-v6-13-v1-0-515d56edc35e@baylibre.com> <20250122-topic-am62-dt-syscon-v6-13-v1-2-515d56edc35e@baylibre.com> <20250124-heavy-jaybird-of-vitality-4cbe24@krzk-bin> <20250124-able-beagle-of-prowess-f5eb7a@krzk-bin> <639b4e3a-3f68-4fba-aa33-c46dcb6fc88f@linaro.org> <74ee6d9b-fd78-4d8a-a94f-b2c4dc794b60@linaro.org> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3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53hyV4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 07/02/2025 15:40, Markus Schneider-Pargmann wrote: > Hi Krzysztof, > > On Mon, Jan 27, 2025 at 01:09:49PM +0100, Krzysztof Kozlowski wrote: >> On 24/01/2025 23:35, Andrew Davis wrote: >>> On 1/24/25 10:48 AM, Krzysztof Kozlowski wrote: >>>> On 24/01/2025 17:05, Markus Schneider-Pargmann wrote: >>>>> Hi Krzysztof, >>>>> >>>>> On Fri, Jan 24, 2025 at 09:22:54AM +0100, Krzysztof Kozlowski wrote: >>>>>> On Fri, Jan 24, 2025 at 09:19:49AM +0100, Krzysztof Kozlowski wrote: >>>>>>> On Wed, Jan 22, 2025 at 11:24:33AM +0100, Markus Schneider-Pargmann wrote: >>>>>>>> Add compatible for ti,am62-ddr-pmctrl to the list. There is a DDR pmctrl >>>>>>>> register in the wkup-conf register space of am62a and am62p. This >>>>>>>> register controls DDR power management. >>>>>>>> >>>>>>>> Signed-off-by: Markus Schneider-Pargmann >>>>>>>> --- >>>>>>>> Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++ >>>>>>>> 1 file changed, 2 insertions(+) >>>>>>> >>>>>>> Acked-by: Krzysztof Kozlowski >>>>>> >>>>>> Un-acked, I missed the point that you really speak in commit msg about >>>>>> register and you really treat one register is a device. I assumed you >>>>>> only need that register from this device, but no. That obviously is not >>>>>> what this device is. Device is not a single register among 10000 others. >>>>>> IOW, You do not have 10000 devices there. >>>>> >>>>> Do I understand you correctly that the whole register range of the >>>>> wkup_conf node as seen in arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi >>>>> should be considered a single syscon device? >>>> >>>> I don't have the datasheets (and not my task to actually check this), >>>> but you should probably follow datasheet. I assume it describes what is >>>> the device, more or less. >>>> >>>> I assume entire wkup_conf is considered a device. >>>> >>>>> >>>>> Unfortunately wkup_conf is modeled as a simple-bus with currently 5 >>>>> subnodes defined of which 4 of them consist of a single register. Most >>>>> of them are syscon as well. So I think I can't change the simple-bus >>>>> back to syscon. >>>> >>>> Huh... Maybe TI folks will help us understand why such design was chosen. >>>> >>> >>> Many of the devices inside the wkup_conf are already modeled as such. >>> Clocks and muxes for instance already have drivers and bindings, this >>> is nothing new to TI. >>> >>> If we just use a blank "syscon" over the entire region we would end up >>> with drivers that use phandles to the top level wkup_conf node and >>> poke directly the registers they need from that space. >>> >>> Would you rather have >>> >>> some-device { >>> ti,epwm_tbclk = <&wkup_conf>; >>> } >>> >>> or >>> >>> some-device { >>> clocks = <&epwm_tbclk 0>; >>> } >> >> How is this comparable? These are clocks. You would have clocks property >> in both cases. >> >> >>> >>> with that epwm_tbclk being a proper clock node inside wkup_conf? >>> I would much prefer the second, even though the clock node >>> only uses a single register. And in the first case, we would need >>> to have the offset into the wkup_conf space hard-coded in the >>> driver for each new SoC. Eventually all that data would need to be >>> put in tables and we end up back to machine board files.. >>> >>> I'm not saying every magic number in all drivers should >>> be offloaded into DT, but there is a line somewhere between >>> that and having the DT simply contain the SoC's name compatible >> >> That's not the question here. >> >>> and all other data going into the kernel. That line might be a >>> personal preference, so my question back is: what is wrong >>> if we do want "1000 new syscons per each register" for our >>> SoCs DT? >> >> Because it is false representation of hardware. You do not have 1000 >> devices. You have only one device. >> >> >>> >>> (and the number is not 1000, scanning the kernel I can see >>> the largest wkup_conf region node we have today has a grand >>> total number sub-nodes of 6) >> >> But what is being added here is device per each register, not per feature. > > The register layout is like this: The register layout of what? How is the device called? Is datasheet available anywhere? > > 0x8010 - 0x803c contains 4 clockselect registers > 0x80d0 is the DDR16SS_PMCTRL regsiter > 0x8190 - 0x8600 contains another 7 clockselect registers > > I see the feature here in the block being clockselect registers. But the > ddr-pmctrl register doesn't fit into this so I opted to describe this > single register as one node as it looked to me like one feature. Of > course I would have preferred this to be different but it is not. Would > you prefer the clockselect registers and the pmctrl register to be > described as one syscon? No, because all the time you speak register=device and all the time I was explaining that this is not correct. Device is the collection of registers. I already said it - entire block is the syscon, not one register in the middle, not 2 registers in the middle, not even 4+7 registers in the middle. Best regards, Krzysztof