Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp512377lqj; Sun, 2 Jun 2024 08:41:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV44D2u6L84JoY6PnV+lNMB7+mv532Alrs72XWno+TTGegD0/Rd2GUxxacvlBRFewop1A7jRI3NltcEfGgdyWciYcnp6DtBGf3vCS7HPA== X-Google-Smtp-Source: AGHT+IGwtlW73Jwk07qkMPkTmXOyGJFd5+X/7ATq/OH/958krp1qU1pQpLk1bQl2ib+uxPaZLvOf X-Received: by 2002:a17:902:d4d0:b0:1f6:38ba:ef51 with SMTP id d9443c01a7336-1f638baf3d5mr69567545ad.15.1717342900706; Sun, 02 Jun 2024 08:41:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717342900; cv=pass; d=google.com; s=arc-20160816; b=v4q/B4ePsFVRB19p61fNwNvgQPeThtajQmsMCLR0+C3waFNK6fmLE9tILIJWIo2vLn MNnmhvfIPzxNLi/ms+Sp/1uq4I4sgjGJpfCNYKB41HIGOTNADdA6X6bIA++Dqs+1im+R dU5e09pwBPEypeUssYtAoFEIdEf+HelRcnEU+FyNO9Vq4myPJIYYKnmy2/K5rx+LvNQl yC2tv7dxx8AH/r1LmeEB4S/BMyDkgTUbes1SVVlwZjnHihvIYOhYwEdg2Afxlv8bTxBv 7ZGmUtsHmeEHHei6umi/0MrwwDqfGS3NLMsjqfGvNuaDTKOWkdC4hauLVnjyrr//6fD1 2hoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=dkim-signature:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=Fd1Lsy5QNOanvMIRy/o0jKg+8qGYkFTM1ga4jW9aSxo=; fh=9m9cUyCufFSS8h6UHpaGd7f7zAGik4iX06J85Xd2c80=; b=Ep5wRqWCE4ngThg6JKfPuvEtxa4FTsmW/FnGNNA6jtpfmCBSFxlu5vLNIREKLBYgXg 8mtlMHEY+HX13RM1ssQfaVKWAj2+pN3I3fpJicPmVLF20QR75UCZYx9onYOtCWTrHHr0 5b5++KTYnP2MExYhLLMNbDNQE84hjM9eUQm87t746B72KxuVu8ihi32RSp+p1/jgynrt 0L936v/q4V1p6ArgJYZyMlzRzkHx/MiL8EbmtAuqeE8u9ERQt9OBV0SLrJ8ckMWKPHJE Ufgo1ghSaC7hzml5bv7qbjTRDuzNgkLIOHEC7/2BIgOcMzS5PXNjXFrSLFaG1NP+yL5i Q8RQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=neutral (body hash did not verify) header.i=@freemail.hu header.s=20181004 header.b=vTjdqiLR; arc=pass (i=1 spf=pass spfdomain=freemail.hu); spf=pass (google.com: domain of linux-kernel+bounces-198332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198332-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6324183b1si51585285ad.574.2024.06.02.08.41.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 08:41:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@freemail.hu header.s=20181004 header.b=vTjdqiLR; arc=pass (i=1 spf=pass spfdomain=freemail.hu); spf=pass (google.com: domain of linux-kernel+bounces-198332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198332-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 14ABBB224E3 for ; Sun, 2 Jun 2024 15:39:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C947C4AEF2; Sun, 2 Jun 2024 15:39:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=freemail.hu header.i=@freemail.hu header.b="vTjdqiLR" Received: from smtp-out.freemail.hu (fmfe35.freemail.hu [46.107.16.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AFD9517736; Sun, 2 Jun 2024 15:39:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.107.16.240 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717342755; cv=none; b=VfUFt+EOWDUPERSOfX4wK4qWKZMn23YWHyyWrvFJP0ZLo79c9XjaghMqufDkPITzWG7Elrd123SKfEfFcpTh6AiSACmxSGKTSuIm9oMyGSF1ynxi/IUt/unBaEVU6GgQ1Zmcz0bXCau/b1rf1ee+53IM0dFXc0Hac4Mo4a875Pw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717342755; c=relaxed/simple; bh=cu1Ss0V90yPLtbBTiY5VNm7dU1DFjdCGGYetsr2pX8M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JhT3+GoZ66EXL2U4auYIfJGg5HyLXScpoVssYTkpaIZc9U2XZcFAKIMcTSgzJ7NfAwzvEhmuHAP5hoU2VNKDupTeY41AbFgKRk/zUJZSo43r+9iiIDlRUnX5vZVjs6WeaIlhVYBz/KnBslf4ssxL87inNEHMBlw9o2Y1St6YYkQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=freemail.hu; spf=pass smtp.mailfrom=freemail.hu; dkim=fail (2048-bit key) header.d=freemail.hu header.i=@freemail.hu header.b=vTjdqiLR reason="signature verification failed"; arc=none smtp.client-ip=46.107.16.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=freemail.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=freemail.hu Received: from [192.168.0.16] (catv-80-98-74-198.catv.fixed.vodafone.hu [80.98.74.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.freemail.hu (Postfix) with ESMTPSA id 4Vsgmz6970z4F6; Sun, 2 Jun 2024 17:31:15 +0200 (CEST) Message-ID: <30944fda-6d18-4fc1-8c73-bcda4814a417@freemail.hu> Date: Sun, 2 Jun 2024 17:31:10 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] spidev: Introduce "linux,spidev-name" property for device tree of spidev. To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240519211346.30323-1-egyszeregy@freemail.hu> <1ec9e8e5-0818-42b0-8776-d9cfb0585f42@sirena.org.uk> <9ae65e3c-f1fa-4ca9-8d74-12d92c51c5c6@freemail.hu> Content-Language: hu, en-US From: =?UTF-8?Q?Sz=C5=91ke_Benjamin?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/relaxed; t=1717342276; s=20181004; d=freemail.hu; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; l=3367; bh=Fd1Lsy5QNOanvMIRy/o0jKg+8qGYkFTM1ga4jW9aSxo=; b=vTjdqiLR8mjuIVqAkyaMnTEB02XIsX9+HBbE21M3InL4/8FoE/GrIJM08VoYWTbL OjGKneyr0KehwQ6onnMnK54diGTV3HJ84/KdyVXub9Ufx+qC9Wm5Qe+Qz6BIX81HsQ5 tip24fmmsj80XbUY9qcVWArgrz0H6slaQeQytsqyPuygYe+wm53aVIynEvZOL9AX6Cs vk8jbemGU/DJK6kB6U4wlcZJiNdJCyKSryrToPwloFOyBbY3hXurdCfU6LHpZNMaLTf /6yV4sfbvlH2Hs+IbxJTqfRxd/gLKrCjrkPUnk2YfzRQ8yrL6IOLCjEWQlb9cT3tsT9 dNuUv8Nujw== 2024. 05. 20. 22:14 keltezéssel, Mark Brown írta: > On Mon, May 20, 2024 at 07:20:12PM +0200, Szőke Benjamin wrote: > >> So, in Yocto project build system point of view the best, if any Machine >> specific settings is stored in the device tree files of the target machine >> in driver levels/config, because it will be deterministic in 100% sure and >> it will be nicely separated from the SW meta layers which may not contains >> any machine specific hacking with udev and so on. > > Given that with Yocto you're building a full system image it's not > super obvious to me that it is particularly harder to ship udev rules in > the image as opposed to modifying the DT. It's a little more annoying > but not drastically so and it's not creating a burden on the ABI for > something that's mainly used within a vertically integrated software > stack. > In Yocto and Buildroot it is harder and more ugly to provide MACHINE specific settings in a rootfs config files than define it in the machine specific .dts and .dtsi files because they are separated in meta-layers for SW recipes and HW related machine recipes. As i know udev is much older than device-tree in Linux kernel history. For embedded Linux image maintaining/developing for ARM, RISC-V etc. to solve this kind of features/issues is more elegant to do in device-tree than with udev, moreover for an embedded Linux developer it is more familiar to do in device-tree then udev. I spent 3-4 days to understand udev rules files and i tried to do it via udev, but i gave up it due to it complexity and incomplete documentation about it. axi_quad_spi_0: axi_quad_spi@a00a0000 { bits-per-word = <8>; clock-names = "ext_spi_clk", "s_axi_aclk"; clocks = <&zynqmp_clk 71>, <&zynqmp_clk 71>; compatible = "xlnx,axi-quad-spi-3.2", "xlnx,xps-spi-2.00.a"; fifo-size = <16>; interrupt-names = "ip2intc_irpt"; interrupt-parent = <&gic>; interrupts = <0 106 1>; num-cs = <0x1>; reg = <0x0 0xa00a0000 0x0 0x10000>; xlnx,num-ss-bits = <0x1>; xlnx,spi-mode = <0>; #address-cells = <1>; #size-cells = <0>; spidev@0 { reg = <0>; compatible = "rohm,dh2228fv"; spi-max-frequency = <1000000>; // via my kernel patch -> /dev/spidev-mysensor // linux,spidev-name = "mysensor"; }; }; As i understand "axi_quad_spi@a00a0000" can be mapped via udev to a custom symlink name but in a new adaptive SoC HWs like AMD ZynqMP, Intel Stratix, Microchip PolarFire Soc etc. it is not possible and not good solution because this axi reg address can be different and become to non-deterministic in day to next when there is a new PL FW update for their FPGA part in the silicon. What udev rules have to use for it if you say it can be perfectly done via udev and "axi_quad_spi@a00a0000" cannot be used for making this rule? >> DT binding would need to be documented later in a separated patch as a >> guideline mentioned it in Linux repo. > > No, that needs to happen along with the code change. The official documentation says totally different: "The Documentation/ and include/dt-bindings/ portion of the patch should be a separate patch. ..." https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/submitting-patches.rst By the way where can i find .yml or .txt dt-bindings documentation of spidev driver?