Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp286375pxk; Thu, 1 Oct 2020 02:18:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyB5K6h/H59CX0h2frjB35IpFm8+w+PLr0sRoBbM+jnEDOF/pNB1jgaKr4m1PcTRLAhFJ6r X-Received: by 2002:a50:9f6f:: with SMTP id b102mr7011686edf.272.1601543903643; Thu, 01 Oct 2020 02:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601543903; cv=none; d=google.com; s=arc-20160816; b=g6BPVaqkSy6By3Bu2BKshrgs0sXLGNmpAw9xmQ5SvRGJOYGxnhVznr+Ve9yMN4zvTA luFSzvfY81WiISXwvGPn+IE4lJOeBOWjUAVkWb3qizDErXNJ0hGUV7e/m1YZ8wFr53HK cZZ+NrI/WX1FbHErd7bU6uVzhhkdB0iKK4EVhy/+wl9o99wn9GGEfzuRkt1C+CpOTqiA bNPfMZqhQF+9QaRVVGBksh917dbowRF1ibRnRj3nu7OwNAXf+DYrQB8sTBZyCUXxN4vo 9RqR7/UD9tcubCYQYnQR/Z9EGDIiKuGse6HyT4o++oNYi9LPDteDl74NJsfj6VZj1d4u mksA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=b/JppFBSghzWwMyd2w6BIHH8WQjO47AYm52+uawBv9A=; b=xCy49IcTPvfKJZ2zGb0VJr6F66rNUbozVPVKoDQSup2M7iVSGSmBjJm/Epze+jlntD 2hj55Bh9zqmz6+BSBxF9jY+c8rvjOpjNc1QLyUalKtSo3sQmUjHzKAiDXuTwLpmMTGAi KXreoGht9N3gs/i5pMQgyESKMDeCD+py4qXCVEM3OdWIT740seZqsrC9MAn7LTHgbqVi Yvinl5PKe10fIOeC+NSMcffq4+cBMfcsWkYleQiTFm0UzgGjEiPLKK3DYpjZ/LIhh6aN dEV9ey1z+pnoV4hFbYOFDkn+ykTTid1tyYrdjfXeIvUcQeCcx/xKqGcbyJ3sYB2P1ev8 LZGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AN5SSI5U; 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 x20si3009664edv.348.2020.10.01.02.18.00; Thu, 01 Oct 2020 02:18:23 -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=default header.b=AN5SSI5U; 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 S1731131AbgJAJRF (ORCPT + 99 others); Thu, 1 Oct 2020 05:17:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:54334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725894AbgJAJRE (ORCPT ); Thu, 1 Oct 2020 05:17:04 -0400 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DE0292087D; Thu, 1 Oct 2020 09:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601543824; bh=6tCffKGBRQz3g32yfl6DkyDrZEG2XbapbE2KKFd9bFs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AN5SSI5U9O+gMSlLWJ7RJOfXa6uj3epvq3cELm3AS4w2TgnFg/ARJ99641p7wyjax /Vd1pJplNN2ZBYVbriQEJSC8YfpkG2CBaGDgmIngJsh0Ag3sfPb7VoR1NK/lBocqpU yjNKsTwUq4SwbS0IzKrXv0GFCXToU7BCaJFXEdYE= Received: by mail-ej1-f54.google.com with SMTP id i26so6925998ejb.12; Thu, 01 Oct 2020 02:17:03 -0700 (PDT) X-Gm-Message-State: AOAM532hCmnhb101TA0jGuVTQoLwBtmlg5LhmBWhmF7Bcq0UbFWc9uYE LR4pZV2Pd77fsatHlMQnRKoWT2qDnDfA5ZNgPZ0= X-Received: by 2002:a17:906:82d1:: with SMTP id a17mr6907875ejy.385.1601543822483; Thu, 01 Oct 2020 02:17:02 -0700 (PDT) MIME-Version: 1.0 References: <20201001072236.GA4815@kozik-lap> In-Reply-To: From: Krzysztof Kozlowski Date: Thu, 1 Oct 2020 11:16:48 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: dts: exynos: Add a placeholder for a MAC address To: Lukasz Stelmach Cc: Rob Herring , Kukjin Kim , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "linux-samsung-soc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , =?UTF-8?B?QmFydMWCb21pZWogxbtvxYJuaWVya2lld2ljeg==?= , Marek Szyprowski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Oct 2020 at 10:36, Lukasz Stelmach wrote= : > > It was <2020-10-01 czw 09:22>, when Krzysztof Kozlowski wrote: > > On Wed, Sep 30, 2020 at 04:31:51PM +0200, =C5=81ukasz Stelmach wrote: > >> Add a placeholder for a MAC address. A bootloader may fill it > >> to set the MAC address and override EEPROM settings. > >> > >> Signed-off-by: =C5=81ukasz Stelmach > >> --- > >> arch/arm/boot/dts/exynos5422-odroidxu3.dts | 18 ++++++++++++++++++ > >> 1 file changed, 18 insertions(+) > >> > >> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boo= t/dts/exynos5422-odroidxu3.dts > >> index db0bc17a667b..9f7f3eacb750 100644 > >> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts > >> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts > >> @@ -70,3 +70,21 @@ &pwm { > >> &usbdrd_dwc3_1 { > >> dr_mode =3D "peripheral"; > >> }; > >> + > >> +&usbhost2 { > >> + #address-cells =3D <1>; > >> + #size-cells =3D <0>; > >> + > >> + hub@1 { > >> + compatible =3D "usb8087,0024"; > >> + reg =3D <1>; > >> + #address-cells =3D <1>; > >> + #size-cells =3D <0>; > >> + > >> + ethernet: usbether@1 { > >> + compatible =3D "usb0c45,6310"; > >> + reg =3D <1>; > >> + mac-address =3D [00 00 00 00 00 00]; /* Filled in= by a bootloader */ > > > > Why do you need a placeholder? U-Boot can just append the > > address/property. > > Several other dts files have such placeholder > > git grep 'mac-addr.*\[00 00 00 00 00 00\]' arch/arm/boot/dts/ | wc -l > 26 Yeah, but if this is cargo cult, then it is not a good reason. First of all= , git grep '[^-]mac-addr.*\[.*00 00 00 00 00 00.*\]' arch/arm/boot/dts/ gives just seven boards. Not a big number to make a standard. :) The meaning of mac-address, I think, is not a placeholder, but: "should be used in cases where the MAC address assigned to the device by the boot program is different from the local-mac-address property." I think you actually wanted a local-mac-address and the majority of DTSes use it. Not mac-address. > > I can see two scenarios where this patch may be helpful. Another > (simple) boot loading code might be used. OK, good point. However other bootloader still has to adhere to the DT specification and the bindings. > The value may also be > customized during build time and used without any support of a > bootloader. Yes, with an overlay. You do not need a placeholder for this and actually having a placeholder instead of using overlays is the wrong approach for customization of boots/builds. > Finding and filling a placeholder would be easier in u-boot too. U-Boot already has the code for updating mac-address or local-mac-address so how is it easier for him? You mean that it cannot find an ethernet node here? > And it serves as a reference how to configure a USB device in a dts Great places for references are examples in bindings. Best regards, Krzysztof