Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp849623pxb; Tue, 19 Oct 2021 14:29:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6AGRGiFolFKp8PB6AYqrDcJaD6AKuiN8X+TEH6kA1aDDm7QeypAvDWIz5pXYWhtOnXt8Y X-Received: by 2002:a50:cd97:: with SMTP id p23mr57130890edi.206.1634678996994; Tue, 19 Oct 2021 14:29:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634678996; cv=none; d=google.com; s=arc-20160816; b=U4hCh2xeEHrBJWI8Tpjh/aGrlaY7BSIKMCcXDgXMeqfawnKeUc1tLBp27bZQ/CT/SO hnU8DtDefwdwKZ4hy36kDizsqS+m9+CWwp2omjTg+c+9mlUo1Gf/ujgh8kZJ0sjZsS9S a3KByIWEc+pYlMe7sCvwFt1mtNQEyrR6SlftDyvXeixHLy+zlxKrSeWh4lEZdF9+kYIr jS2YoQX+6+wAXMWjCbOamr8GYXslJUZqH+bte5S4XG3YGDw5B1p5sOD3JC1GBg6U9MEs DuD00K7YaDH8iGKtEweve4BL5kfoWAUeWiGruKWEhe+uqSZvnyToMs563RLImUGr0gHQ TwPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ELdXnWoTcDfKNNp2FNOSy6oSownDJY2fFOIafD9L2zU=; b=hve8Cena/wiCIgPEzLUjPWRj5RHGiKB2n9z8BcZQl4QLlKlnlzL/jJDiFJtZncbMnZ cYYDDZjONFA/vVNAbxhl288HnxhoFRgGtcxgiIhAeXrMdMUMgwPKVv1MpLGBHhzYga6X K/7j6e5dKVv6FgMO8T6JJKO6feJ6fq8l/LAKpvV4wkmMaXY0/JIFHygwu6aA+y6nHcxP bmaFUq97h0dfUyX2iPZb1JK+YhLGL51ZTlttpLtok60ak2dIeONZtM0TR5SvP2PYSaUT 6eXbkFbDVIOmkRFKr6SLSVnD67RyqAhx0PJT3GBgT1zS7dpka6cwr5ERQrpkvE49ZDg+ H7gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hA8jLmLC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg41si181153ejc.709.2021.10.19.14.29.31; Tue, 19 Oct 2021 14:29:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hA8jLmLC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229546AbhJSV3l (ORCPT + 99 others); Tue, 19 Oct 2021 17:29:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:38352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbhJSV3k (ORCPT ); Tue, 19 Oct 2021 17:29:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4D639611C7; Tue, 19 Oct 2021 21:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634678847; bh=n5oKhj49goNe7lHOmGWW8DH88TSwDNvemsZekDVUD+g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hA8jLmLCMkT0f8JITb9xNQlvJW/fBCTKXqZqkYvpXpW9mIuTSpdqXIQJYXFgGnyqb XAU6fUA6S4YpfO7TT9OTDvEJklw/Sxr4JV2Gy8XsUhJCYCAiR+tVsAhE9AO7tsWfRG 7KM3wKkpTlyultA7pI12K4mjHuLzfBrOeIXS+1X6/G9nlmO9KMZ158dGkcrBtsuoSz Y21Z0w0DxNlxhb0UrG1ccW4ehLnJMBGfAZzh9DCsxQyt3VXuxM/+kGNgBXrJhJ1fFI PgSl0UsxBrkNcJGWUQBqkaso6+9h7eXXUmIFEGEfM0iZFuyV1QCOGRJYsrs/1Ln6nX A7pyLacvyHGZg== Received: by mail-wm1-f50.google.com with SMTP id v127so14540204wme.5; Tue, 19 Oct 2021 14:27:27 -0700 (PDT) X-Gm-Message-State: AOAM532/i/abnc/NQwMetnRfgvhYWR9014cAOHspg2rCUx47sB9g+MIn G1fuwotp/+P+GnEmK9AAHz1amxnTwElIhjFPwBI= X-Received: by 2002:adf:e292:: with SMTP id v18mr45066638wri.369.1634678845729; Tue, 19 Oct 2021 14:27:25 -0700 (PDT) MIME-Version: 1.0 References: <1632399378-12229-1-git-send-email-rajpat@codeaurora.org> <1632399378-12229-9-git-send-email-rajpat@codeaurora.org> In-Reply-To: From: Arnd Bergmann Date: Tue, 19 Oct 2021 23:27:09 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V10 8/8] arm64: dts: sc7280: Add aliases for I2C and SPI To: Doug Anderson Cc: Bjorn Andersson , Rajesh Patil , Andy Gross , Rob Herring , linux-arm-msm , Linux Kernel Mailing List , DTML , Rajendra Nayak , Sai Prakash Ranjan , msavaliy@qti.qualcomm.com, satya priya , Stephen Boyd , Matthias Kaehlcke Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 19, 2021 at 11:11 PM Doug Anderson wrote: > On Tue, Oct 19, 2021 at 1:57 PM Bjorn Andersson > > Hrm. I know this gets into slightly controversial topics, but I'm a > little curious what the downside of having these in the dtsi is. In > the case where these i2c/spi/mmc devices _don't_ have "well defined" > numbers in the hardware manual of the SoC then I can agree that it > doesn't make sense to list these in the dtsi file. However, in the > case of sc7280 these numbers are well defined at the SoC level for i2c > and SPI. > > Said another way: if you have a board that's got peripherals connected > on the pins labelled "i2c2" and "i2c6" on the SoC then it's a really > nice thing if these show up on /dev/i2c-2 and /dev/i2c-6. > > ...so I'm not sure what board exactly would be overriding and > re-numbering? Unless a board really has a strong use case where they > need the device connected to the pins for "i2c2" to show up on > "/dev/i2c-0"? There are multiple things going on here: - The aliases are traditionally managed by the bootloader, same way as the /chosen nodes including the kernel command line, so the numbers are local policy, and the per-board defaults are just for convenience. - IMHO there should not be any aliases for status="disabled" nodes, and the status is usually set in the board files. - The labels on the board don't always match what the SoC calls them, or there might not be any labels at all. This is more important for things like serial ports that are often bare connectors rather than already wired up. The aliases should normally match how the board numbers the connectors, not how they are attached internally. - For i2c, it's not uncommon to have i2c devices attached behind expanders on i2c/spi/gpio/usb/pci devices Arnd