From patchwork Sun Jul 7 23:08:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 13726093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0A47C38150 for ; Sun, 7 Jul 2024 23:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+S9OSUigqR1QELuwVzUa8jMQbpjpl/967lLxUHXmC8Q=; b=DlHy+z3lcaNscd Jz8FgdQMqkqQ5ym5thz3G08+XqxACajiVtTElrhDP4gxeSy4n/4ZOBE5UjPUqnhzKNjFC24Y7YbT4 ti0gcq1vHeitI2J/dLtHTi+TOuZT35GWcnlT1iIUhFEEn6yxmiaSYH6DM5A1NyTAfY8pwv94bclfh VxF5lHLCtuPDe2G7ktGTc/CrrW+P+4QeQyosh2iYzulbREz121jCZLCtAdA8HL4GjOJGFbm69ZStn vFVTDLkxZ4++J8svoYD95t6u7BUsNv1D+Io2dQrE8D2emkKj9a5iOQWFMe1f6jzEw/Lp/yrHFtOsq IcyM3s3H1n94UwBPLoyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQazu-00000002Op6-0Jzg; Sun, 07 Jul 2024 23:08:46 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQaze-00000002OmR-0OgA; Sun, 07 Jul 2024 23:08:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1720393702; x=1720998502; i=j.neuschaefer@gmx.net; bh=+S9OSUigqR1QELuwVzUa8jMQbpjpl/967lLxUHXmC8Q=; h=X-UI-Sender-Class:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:To:Cc:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=PdAgx+q4ctZegUNrzSbK3MYPETaBPNHLdHUeZ+Rv8ogocpESbbpP5dxh+YeaA9Gx 98y53xSJ3X0kmBo94UAPCymRgV9WzHWEbFUrFYi6JQCFVKujTQcBjyMH6+or7+cz8 the/Gu9RR2sqaX0kDewih578z4cIgijxZFw1B8ioUF112+yZvOAqVqyYpPxb0Fcd1 VKCcganQYismkdd1L5F3bx5PwBXj60OW47ni2CSX9Pm5Enj4zkAbsADgvgLd75+B0 tM689xXlSEZ9SilI+cy3mr+Zz+2Ela9vx6zE8AByFr855s8gMJcUxvDxr9Eg+XD6r mEri7boRZVPawmMNeQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from probook ([89.0.46.161]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MNKhm-1sjsw33Gby-00MW0B; Mon, 08 Jul 2024 01:08:21 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= Subject: [PATCH 0/2] ARM: Expose Raspberry Pi revision code in /proc/cpuinfo Date: Mon, 08 Jul 2024 01:08:13 +0200 Message-Id: <20240708-raspi-revision-v1-0-66e7e403e0b5@gmx.net> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAN0fi2YC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDcwNz3aLE4oJMXZhSXQuTlLS0lLTE1KTkVCWgpoKi1LTMCrCB0bG1tQD mIKlfYAAAAA== To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Eric Anholt , Stefan Wahren , Russell King Cc: devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1720393700; l=1042; i=j.neuschaefer@gmx.net; s=20240329; h=from:subject:message-id; bh=ZyRsplzPA8fcdb9KWZGmC/Hoa7oi0rWcdebvqmwsbTk=; b=MRQTYxk8zF76z57f2Cdk/vS/yuiLxDW8LgKxLxpW5E1CZ0wNYLROBKNrQNzJY8t0r7zAL/YXl 3ehdtEQohqfDdhF+2YeMNPvPpszKDM+naWfFC+01sZiS2fsHdoIWx5s X-Developer-Key: i=j.neuschaefer@gmx.net; a=ed25519; pk=NIe0bK42wNaX/C4bi6ezm7NJK0IQE+8MKBm7igFMIS4= X-Provags-ID: V03:K1:W4gI5CL2VMwpJHko+dxID0o9ybNVCzNUhdEH122PfIERrqHNiny N/iHVBcAKt+u6UiOPGMIs5Smfl0jEnH5toJhJygzp+cbwIuyEn6PapLY4QEv+BN5Z60GvMo PRAzbFR+QkfeUQuNrVFrSN1AcfO+JI+ShbWny5b4Nbsk6UHC4dNZ04uerGts4XcCLI+5MUk s0lzuQmrDWpygrTpiDUhw== UI-OutboundReport: notjunk:1;M01:P0:XTxmi9VUGs4=;0pjbm/ZvC4kZj/iX/eRzJneNMex dH1qPLK5aSGrbRk1IML2ZL4CEMesOAKi7f6Gb5PQ6VaZkECUaBeyUObsApUMNda98U2fGma6b 0/pOjZk4fYek8LZLu91RvzEnun2WDcMsqvOt0wUF/4mJG2NYXZ1b4mYG4wD6euKMFoc3cdRW3 sAT9oVP924rDh0oPUwEEmnOxq0EV87AeUxzhYMoGPZB6gmFZjczFo1Ldw3AtSbkbfs7IGz+H6 015pkUyV1PkDVdz6akhhV4W5b8Y4Mol7h1jBCKqrNj2AM79A4G6o3aCtDZkbNaAC875CXqOCk fweq16PBmD2F2eEI3esxWNY0SZa1wTUqedB/0QDZQvUYbkAejbvornPWhAwIMsHsDeTxYjmjf yoHNTjHGiJV7w1SsAhRQ9o0/QQuSbuSdrefTqv9a8nZnEaV/R+t+/NUZJCqZ5lvFcmw1rXjnN +7DoVs6Yr4AGbS+gqiA2sVEr3RYAYAdFlJ4jiEgf8OQoOmMcw+1zm/Vvz6xc2PN5Pn1gNKt7l I1dEozLgL0el7BtX+WvvNIk+yd6l/PLqmixDXG/cXWnfYYygSU5UTiwFN0hJugngqM+BDc4vm 8koCF/BB2aSM+cI9d5nYUSuyexFooVx+bPZZDTxzoxCVnuFKThOGNqJOnJYX/ess5zgzeX66U ml84OV8X+xH1VPyepQU9xoJk6k4RiJursWj+IEa1ueGISdtOuhtdYe7TPtjsoEVWujO3oDfzu IuqTPkbQrED0DQG34M2xZnZ+44bbmx60mVCmXmtYiP/SYywdD6MVnwMT8xQlL/WYMMZSP9NJO f0OSal6b0O+ATE/rE/1GAHGJGDGvQ6AwX2BC97NkWr6Tw= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240707_160830_456318_B9526224 X-CRM114-Status: UNSURE ( 6.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Raspberry Pi boards have a "revision code", documented here: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#new-style-revision-codes This patch copies what the downstream kernel does and reads it from the devicetree property /system/linux,revision. This enables some software to work as intended on mainline kernels: https://github.com/hzeller/rpi-rgb-led-matrix/blob/a3eea997a9254b83ab2de97ae80d83588f696387/lib/gpio.cc#L247 Signed-off-by: Jonathan Neuschäfer --- Jonathan Neuschäfer (2): dt-bindings: arm: bcm2835: Specify /system/linux,revision property ARM: bcm2835: Detect system revision Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml | 12 ++++++++++++ arch/arm/mach-bcm/board_bcm2835.c | 11 +++++++++++ 2 files changed, 23 insertions(+) --- base-commit: 22a40d14b572deb80c0648557f4bd502d7e83826 change-id: 20240707-raspi-revision-84dffdfaebce Best regards, -- Jonathan Neuschäfer