From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B34929D277 for ; Fri, 23 Jan 2026 19:51:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769197872; cv=none; b=CXJbRlgaZ4d/+Cesl3N16+feYH+r9mcqEP2B8Z11ea60j/ho5wA6ygpjjBTf9t/Rmve6EC3YyU3yNISdpsNjnKRGpWctDG+a87sXXG0RKvqBYpMDz4Ezj8E43Dn/q5HgNzg63F+55LWLvhR6SaLt7wWfgEIT9Rc/+6yiVor9Om0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769197872; c=relaxed/simple; bh=kx6N8Fat+v4rKXAq3jr9szVFIZj8vDQESPGqHR9vba4=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=hq0wEcIpBgL3miGUrLU2/u5/rHB0ki1HuZg5a0Oa7uWDXl/eYYx+/4J38Pj3X0iw5VVWCqLn3UF+XF3CbURgKwbi8jkjWuoJAdvrcs2RoqgCkXVKHS8F6MB1IWVH5TqhHx2DJNEW+KF1NGvkjvwbwylKsbpIHET9wmoVvb3m674= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=vO3kAepe; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vO3kAepe" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-47ee807a4c5so27058945e9.2 for ; Fri, 23 Jan 2026 11:51:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769197868; x=1769802668; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=8jNsJjXS8M5t/mEUZRdZlxrFzfCZpFMkBqFJLBshMIk=; b=vO3kAepe+aFIJKsU8yTO/kodsox4ao6cA3nXcJksSe9lni0T/QJXRBAUK/a6Fyqyqg ek9chWU2/CKKNc4/pZtSWQzl0wwxqwD6KXqCGpeyYdJs6Dfolq5U4SnmOORRWmRYKKI4 aysqphxgC8fHk5m39nwZ9SnWPuKj5dAEBUCUh4Q0VUr7GMajixL8Nt+y9lVlV1d4JAHI YfTzd/0llFEhNtji7cMS5JuolFnseBvPaXHMrc3Qhi68IzZrTWtMRT1L0ZrToh+XokPJ dxwKq32isEIPAQrg+CN1WXqURVQSIXToLaIC9JB8SBi6kjERsnv5ci9ALNBKH2En3PW1 UKkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769197868; x=1769802668; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8jNsJjXS8M5t/mEUZRdZlxrFzfCZpFMkBqFJLBshMIk=; b=WRHqYhVS2wIduLSaMp2LSA7AVrgGm1AdbKLzb/IKEZxGkecCe6ISi/IAOInWDepwTB FF2uA6fu0HCr8/ctG+ILrY8hzINGtcO8rSBIeKzxCBM/RpxlDJZOweOIYDn6dVfLjhYn zLL90kpCATiMSYnOD8roo+gXQerq+QKDTnQYpAjplSbqHfXNDa2LtdJ1APHsCAgzjcZI lZgZ1+8FFxH60AA2xopBj8AbeoKVPUvCG2pFwTXzSAyWAcT4jqlheQi1HP3ehkJw2ReO FMF1ygVSGKggowK94yz9qweir2ge0f+JjyUjZkYIOYh0BBsO0+VxxdVHWSgxBrU1CLD9 e7uA== X-Forwarded-Encrypted: i=1; AJvYcCVwXGgeLzTzdpQNuL+LSlnMjRvqeIZeHxYd9ePkmlFeyMDBD+bYgaOwM2j8sLXbGhg8JNklDdInHDX5@vger.kernel.org X-Gm-Message-State: AOJu0YxH508r5U9efqYNmThK058LcfOK7NpVxWl+ekezbfUeblj++2Nm 0u+DupWgr/fqrJWYRIHdgUYoPQY/lrKmKkwDUfK7ZRdkA6JQLjOKjThqsHnrX0BtT6Q= X-Gm-Gg: AZuq6aIxe71uNLutIeWxCZ+iXWC2vlDSqMWtkbqd1XEJVxiNpxtLv6ZBr7mbZEF8oYO gvD9qpZB8A5J1FixEEUW3mWMxUbRZ43qPp7sleQexD+04UwtNSa8IHpE+TtlYflgosKeoM5oSvQ 6BZIph+F2xc8SWerFUUF2Sv//HqENG4KmJByQRi/nECI5KRKxEGquzY6PbiShpSmL5gka1kYvF6 5T2sP68Ucoj7gjXAWB4Sc5LT1ne3ZN9gnVAg/21OORgPcvcBEBO6ZaGxpJigffAQhz20bR9kTMB qQhtzNwjAtwZLrwMlb9uduz4DNXzmU6rp6amyib0A9/ODZP4Q4k7ETGDfi46KrFoWA6wImKjEab aZXjV5rb2iJh7oM4pvjeGIxWhqIt9r28E3E7lUuXBXET146yqkbX6ZjUsxV2+Vcgna/F6lwRfeB NPNbFXDH5VGyoMEDxi X-Received: by 2002:a05:600c:5494:b0:480:1e9e:f9d with SMTP id 5b1f17b1804b1-4804c94810fmr65373435e9.8.1769197868314; Fri, 23 Jan 2026 11:51:08 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4804d8a5c32sm94300895e9.11.2026.01.23.11.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 11:51:07 -0800 (PST) Date: Fri, 23 Jan 2026 22:51:04 +0300 From: Dan Carpenter To: Chester Lin Cc: Alexandre Torgue , Andrew Lunn , Conor Dooley , "David S. Miller" , devicetree@vger.kernel.org, Eric Dumazet , Fabio Estevam , Ghennadi Procopciuc , imx@lists.linux.dev, Jakub Kicinski , Jan Petrous , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Matthias Brugger , Maxime Coquelin , netdev@vger.kernel.org, NXP S32 Linux Team , Paolo Abeni , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , Frank Li , linaro-s32@linaro.org Subject: [PATCH v4 0/3] s32g: Use a syscon for GPR Message-ID: Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The s32g devices have a GPR register region which holds a number of miscellaneous registers. Currently only the stmmac/dwmac-s32.c uses anything from there and we just add a line to the device tree to access that GMAC_0_CTRL_STS register: reg = <0x4033c000 0x2000>, /* gmac IP */ <0x4007c004 0x4>; /* GMAC_0_CTRL_STS */ I have included the whole list of registers below. We still have to maintain backwards compatibility to this format, of course, but it would be better to access these registers through a syscon. Putting all the registers together is more organized and shows how the hardware actually is implemented. Secondly, in some versions of this chipset those registers can only be accessed via SCMI. It's relatively straight forward to handle this by writing a syscon driver and registering it with of_syscon_register_regmap() but it's complicated to deal with if the registers aren't grouped together. Changes since v3: * Fix the yaml file format * Add netdev to the CC list on all emails so the CI triggers Changes since v2: * Improve the documentation in .../bindings/net/nxp,s32-dwmac.yaml * "[PATCH v2 2/4] dt-bindings: mfd: syscon: Document the GPR syscon for the NXP S32 SoCs" was applied so drop it. Changes since v1: * Add imx@lists.linux.dev to the CC list. * Fix forward porting bug. s/PHY_INTF_SEL_RGMII/S32_PHY_INTF_SEL_RGMII/ * Use the correct SoC names nxp,s32g2-gpr and nxp,s32g3-gpr instead of nxp,s32g-gpr which is the SoC family. * Fix the phandle name by adding the vendor prefix * Fix the documentation for the phandle * Remove #address-cells and #size-cells from the syscon block Here is the whole list of registers in the GPR region Starting from 0x4007C000 0 Software-Triggered Faults (SW_NCF) 4 GMAC Control (GMAC_0_CTRL_STS) 28 CMU Status 1 (CMU_STATUS_REG1) 2C CMUs Status 2 (CMU_STATUS_REG2) 30 FCCU EOUT Override Clear (FCCU_EOUT_OVERRIDE_CLEAR_REG) 38 SRC POR Control (SRC_POR_CTRL_REG) 54 GPR21 (GPR21) 5C GPR23 (GPR23) 60 GPR24 Register (GPR24) CC Debug Control (DEBUG_CONTROL) F0 Timestamp Control (TIMESTAMP_CONTROL_REGISTER) F4 FlexRay OS Tick Input Select (FLEXRAY_OS_TICK_INPUT_SELECT_REG) FC GPR63 Register (GPR63) Starting from 0x4007CA00 0 Coherency Enable for PFE Ports (PFE_COH_EN) 4 PFE EMAC Interface Mode (PFE_EMACX_INTF_SEL) 20 PFE EMACX Power Control (PFE_PWR_CTRL) 28 Error Injection on Cortex-M7 AHB and AXI Pipe (CM7_TCM_AHB_SLICE) 2C Error Injection AHBP Gasket Cortex-M7 (ERROR_INJECTION_AHBP_GASKET_CM7) 40 LLCE Subsystem Status (LLCE_STAT) 44 LLCE Power Control (LLCE_CTRL) 48 DDR Urgent Control (DDR_URGENT_CTRL) 4C FTM Global Load Control (FLXTIM_CTRL) 50 FTM LDOK Status (FLXTIM_STAT) 54 Top CMU Status (CMU_STAT) 58 Accelerator NoC No Pending Trans Status (NOC_NOPEND_TRANS) 90 SerDes RD/WD Toggle Control (PCIE_TOGGLE) 94 SerDes Toggle Done Status (PCIE_TOGGLEDONE_STAT) E0 Generic Control 0 (GENCTRL0) E4 Generic Control 1 (GENCTRL1) F0 Generic Status 0 (GENSTAT0) FC Cortex-M7 AXI Parity Error and AHBP Gasket Error Alarm (CM7_AXI_AHBP_GASKET_ERROR_ALARM) Starting from 4007C800 4 GPR01 Register (GPR01) 30 GPR12 Register (GPR12) 58 GPR22 Register (GPR22) 70 GPR28 Register (GPR28) 74 GPR29 Register (GPR29) Starting from 4007CB00 4 WKUP Pad Pullup/Pulldown Select (WKUP_PUS) Dan Carpenter (3): net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII dt-bindings: net: nxp,s32-dwmac: Use the GPR syscon dts: s32g: Add GPR syscon region .../bindings/net/nxp,s32-dwmac.yaml | 12 ++++++++++ arch/arm64/boot/dts/freescale/s32g2.dtsi | 6 +++++ arch/arm64/boot/dts/freescale/s32g3.dtsi | 6 +++++ .../net/ethernet/stmicro/stmmac/dwmac-s32.c | 23 +++++++++++++++---- 4 files changed, 42 insertions(+), 5 deletions(-) -- 2.51.0 *** BLURB HERE *** Dan Carpenter (3): net: stmmac: s32: use a syscon for S32_PHY_INTF_SEL_RGMII dt-bindings: net: nxp,s32-dwmac: Use the GPR syscon dts: s32g: Add GPR syscon region .../bindings/net/nxp,s32-dwmac.yaml | 13 +++++++++++ arch/arm64/boot/dts/freescale/s32g2.dtsi | 6 +++++ arch/arm64/boot/dts/freescale/s32g3.dtsi | 6 +++++ .../net/ethernet/stmicro/stmmac/dwmac-s32.c | 23 +++++++++++++++---- 4 files changed, 43 insertions(+), 5 deletions(-) -- 2.51.0