Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp917712pxb; Wed, 29 Sep 2021 12:28:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxM/8xB7PFYFFSVhzgPnudvBgomVD8355R8ai7hf9GiJCJDT2DJGChGf9zIPYkisGo/yMN X-Received: by 2002:a17:906:f243:: with SMTP id gy3mr1860514ejb.327.1632943694216; Wed, 29 Sep 2021 12:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632943694; cv=none; d=google.com; s=arc-20160816; b=YRWbSbvCcVytIYmWxg40ci/hYOoMbBj1zuAlcTHMBL235zPUZhGypxFUCZjjAQenaT 1FpGFjX9Wl+s+/+6f/oeVk/UjWlMMWg+Ou2ogVDDJN0D++tjbu2Cy2tPPa3/GJvX+Kuy broO5qP8Fmf+4WyKB8rRdlI0xRlauhlr/ZzfETmGY+Q8BZppKSevEU9NIXFPj0dtM/PE sdIUtTrTZXb+2YKaSO6V7o1vTnDGwtnIxTGfAvBI5es64sb7yYYJwOiFV/ksyJR0DFjh 5tkECI7gqi5LFXSjBhmq57atqK51zAnMLu7Q54BoiAhIIfLAvsleYg+Ejfi2zfDLRlJw JuTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OXSIUySoqLeN7g9BEui9vMtnkEa0xkK8sHXMxyhSmRA=; b=sYq47uyeYDPdy9Ehjj1IOzDkKJJDV5Hqv+u6UHOzz7XWf6RoPvMIgQ1LERTLg2UqYh edBPmOSciwgC++PXi/WEmHv1q6xUFqmf7soFI4F6CN+nS/VmUe5ZYuI6+IZYTnx7J9lr Z7zvtzQzzurNGbGG37ra/pI5Ely0ViuCE8uZqkuknAZ6VCtTpOLYQbdDZ4CBPTI00Pj/ KDNzuiA+3XTfVSdRy+0I7+qeANTsSWcEbiKBwB73oaOoU+cJ3gX7wgv3BhBbIDAHBxz5 Za+MadYxYqlmbFqYuDx768t5ppgHGR3WZfj8vb0p6kkzNvyPRRvwNVPZbxV9+nJjSrPO ynJQ== ARC-Authentication-Results: i=1; mx.google.com; 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 d26si868996ejz.183.2021.09.29.12.27.46; Wed, 29 Sep 2021 12:28:14 -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; 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 S1346186AbhI2Q6m (ORCPT + 99 others); Wed, 29 Sep 2021 12:58:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:51972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346169AbhI2Q6g (ORCPT ); Wed, 29 Sep 2021 12:58:36 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A2B11613DA; Wed, 29 Sep 2021 16:56:55 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mVcbj-00DmcL-Af; Wed, 29 Sep 2021 17:38:59 +0100 From: Marc Zyngier To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Cc: Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Alyssa Rosenzweig , Stan Skowronek , Mark Kettenis , Sven Peter , Hector Martin , Robin Murphy , Joey Gouly , Joerg Roedel , kernel-team@android.com Subject: [PATCH v5 14/14] arm64: dts: apple: j274: Expose PCI node for the Ethernet MAC address Date: Wed, 29 Sep 2021 17:38:47 +0100 Message-Id: <20210929163847.2807812-15-maz@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210929163847.2807812-1-maz@kernel.org> References: <20210929163847.2807812-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com, robh+dt@kernel.org, lorenzo.pieralisi@arm.com, kw@linux.com, alyssa@rosenzweig.io, stan@corellium.com, kettenis@openbsd.org, sven@svenpeter.dev, marcan@marcan.st, Robin.Murphy@arm.com, joey.gouly@arm.com, joro@8bytes.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At the moment, all the Minis running Linux have the same MAC address (00:10:18:00:00:00), which is a bit annoying. Expose the PCI node corresponding to the Ethernet device, and declare a 'local-mac-address' property. The bootloader will update it (m1n1 already has the required feature). And if it doesn't, then the default value is already present in the DT. This relies on forcing the bus number for each port so that the endpoints connected to them are correctly numbered (and keeps dtc quiet). Signed-off-by: Marc Zyngier --- arch/arm64/boot/dts/apple/t8103-j274.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8103-j274.dts b/arch/arm64/boot/dts/apple/t8103-j274.dts index e0f6775b9878..33a80f9501dc 100644 --- a/arch/arm64/boot/dts/apple/t8103-j274.dts +++ b/arch/arm64/boot/dts/apple/t8103-j274.dts @@ -17,6 +17,7 @@ / { aliases { serial0 = &serial0; + ethernet0 = ðernet0; }; chosen { @@ -43,3 +44,25 @@ memory@800000000 { &serial0 { status = "okay"; }; + +/* + * Force the bus number assignments so that we can declare some of the + * on-board devices and properties that are populated by the bootloader + * (such as MAC addresses). + */ +&port00 { + bus-range = <1 1>; +}; + +&port01 { + bus-range = <2 2>; +}; + +&port02 { + bus-range = <3 3>; + ethernet0: pci@0,0 { + reg = <0x30000 0x0 0x0 0x0 0x0>; + /* To be filled by the loader */ + local-mac-address = [00 10 18 00 00 00]; + }; +}; -- 2.30.2