From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (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 982B817BEBF for ; Thu, 2 Jul 2026 17:34:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783013700; cv=none; b=D3m+SafQnDZizIdl0G4RHQJBo02zFH/Gxd7SHjBALSLoRHaJadhI1j6mtuCSkQVkFEfM7Nqmzwziq5kdDj4T+A43+Y1HE7ZDHJpZjIcyZspVIlAnN3cT/3oAkpaNBSlAs+GCZ00CgXIJxDfY5rlJFBd1ng4VQnel1SZ/2Svx+7A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783013700; c=relaxed/simple; bh=hEhWSLr++Q/ZGR1Ejsv0vtyDLrUAeGLaq6Kk+8WBNuU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ryvmmP79feIwPpNEAPHyisaVRMfcafsOs3pb05O6pmLc1n0JHaCytbh+mrMY+2FjUvEE61YJfRBs6Ky/SQtYGd0Swo9uInt84kC9AMhm7LSy65PITq1RZns45tRo9vPIz81MDQlXQPIAz0ktFErVEZje2EcP4oJsL3fqTCNZ7BU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eI4O3yTq; arc=none smtp.client-ip=209.85.222.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eI4O3yTq" Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-92e50979c71so204450585a.3 for ; Thu, 02 Jul 2026 10:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783013699; x=1783618499; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7qJKEGc46A6MaBdapnr1AnlxGbrLJznLMC+lsm+gAYE=; b=eI4O3yTqkYrFCqCyWlCfVzUNuQVLysn61BMPKRPIhNyDOsxthbL6/kJwykS9l5YBOP 2s0qy2DV1W6o/g4KpGIRASIBfv0iVrSqgFHkL6/zR/4b1o6hdUGPdU8Re5LR/r4MCy32 2ROdZ7To1WYru5+Y9sQxcx76jl8jTv4oP0mH6XEzhu4ui9F6KX7wX49JzCHGI2PwEQMC OHdhFpylKGpKvExm4tiCp8Cp2zYtfwKLZdYGyYg1mwC5QCDb/ZQEEof+rCc2+t3jZJNi X4g+ah283vxipCg3JsP6VbuzEaqK/qr0EazAsk6t7usLEwo4Chdl3QrVY5kmQg5aOhLW kBgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783013699; x=1783618499; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7qJKEGc46A6MaBdapnr1AnlxGbrLJznLMC+lsm+gAYE=; b=W0A8aCbXI3SKlnJqiIFNVMXxAKzAD0viQSVJ8GqdLGF8bC3ZQkFBauQkgAkHmW9yIz 29YW7+TdQeANfESiI/dZP+Lgt18JqJ67Eqr+NBs340Ux8kWO7VBUTQKDEyjCr3IKeYoo ppp7Q26eGyLuoVpxhJK2kS9EKHWTBFcTpbCzivKZwweZBlbWH9SdlV7rxocQD7eg5U/N snGK5Az/jOuuieoc/CDi2kvNmxaj5jdum33ZRh7ud9V3b87sxf1ysApr6LdjpQ5m3YGb Md15OEIecxODKN9WLft/wSxOmYoSoy65LWFxPEEwRCpoB/mjEQ+agmNtRdmIMK3GCIJM 47Uw== X-Forwarded-Encrypted: i=1; AFNElJ/I8jLJmDz3bZ+qRRQyTH7uAlo0YM5ZE9OHxgHi8pT7xQI0t9oSJH9JBZF40fYrHHRW4CND2Nw=@vger.kernel.org X-Gm-Message-State: AOJu0Yyg/fgmjnOmPdP2m2k4RFrVISJywWQb1vI75cMP0ZziFj435czw jEESiGIuVis7NVrd6gHnfg1cJ0uXvOPjnVf72QqLcumoETpN7VoSCFpSID+YoAtj X-Gm-Gg: AfdE7cnW1YNIiBARn+B/KS6kXMV+gZZE8sC3mFeMxJQMiX66/rnF0ttjjJ9pA4/EYWT z1sR5oweQFZI4Fs7nZLIJkLIEqbb2Z8ajS9capa4arZJ1Hl+yoKd254Tt+/9rJPEr9GbSPXP4ny jMtHZhZjw66vSzHs2ATK9Y/9pqPlOI/JgsGY8AlYxuksy8nhtvXi44yetvTlL8gP/Kg/Jw5tMle fHxJMcinQxSpQhwPWAcR5hA6j7FwphmPVTjfbx3fBaiDSscmQlfz7bItGoxIFJM21B7efKkwSCM RCdKOzoU9KdFP6KD14c16uu4mv/e0cPkIw49t98ibKg6gq6A+imXaKatFX25ODPVQOtcfWT8h9h 94+pUuYrrmmVAnsrLAaEd3zHRpRyyFWdUY68sx94cI3Tcy/SHe27Pc1CmM/KO7Cn04sPkgXZ4IF 8GUUmQ9C3okYTY+oHr/zJG6PKooHzp1y31VjUSZHYURH0XwhiU6yA8xc8Icgz6 X-Received: by 2002:a05:620a:468e:b0:923:8612:f15 with SMTP id af79cd13be357-92e7823fc78mr907524385a.18.1783013698575; Thu, 02 Jul 2026 10:34:58 -0700 (PDT) Received: from AMD.home.local (dhcp-9-244-8-156.gobrightspeed.net. [9.244.8.156]) by smtp.gmail.com with ESMTPSA id af79cd13be357-92e80162220sm268889985a.25.2026.07.02.10.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2026 10:34:58 -0700 (PDT) From: Enzo Adriano To: Junhui Liu Cc: Andre Przywara , Brian Masney , Michael Turquette , Stephen Boyd , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Richard Cochran , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 7/8] clk: sunxi-ng: a733: Add bus clock gates Date: Thu, 2 Jul 2026 13:34:54 -0400 Message-ID: <20260702173454.855897-1-enzo.adriano.code@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260310-a733-clk-v1-7-36b4e9b24457@pigmoral.tech> References: <20260310-a733-clk-v1-7-36b4e9b24457@pigmoral.tech> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Junhui, Following Andre's suggestion I went through the bus gates in this patch and compared every register offset and bit position against the public A733 User Manual V0.92. Findings below; everything not listed matched the manual (122 of the 135 gate entries verified clean). 1) UART1-UART6 gate bits look wrong: > +static SUNXI_CCU_GATE_HWS(bus_uart1_clk, "bus-uart1", apb_uart_hws, 0xe04, BIT(1), 0); > +static SUNXI_CCU_GATE_HWS(bus_uart2_clk, "bus-uart2", apb_uart_hws, 0xe08, BIT(2), 0); > +static SUNXI_CCU_GATE_HWS(bus_uart3_clk, "bus-uart3", apb_uart_hws, 0xe0c, BIT(3), 0); > +static SUNXI_CCU_GATE_HWS(bus_uart4_clk, "bus-uart4", apb_uart_hws, 0xe10, BIT(4), 0); > +static SUNXI_CCU_GATE_HWS(bus_uart5_clk, "bus-uart5", apb_uart_hws, 0xe14, BIT(5), 0); > +static SUNXI_CCU_GATE_HWS(bus_uart6_clk, "bus-uart6", apb_uart_hws, 0xe18, BIT(6), 0); Each UART has its own BGR register, and in every one of them the gating bit is bit 0. Manual section 4.1.6.141 (0x0E04 UART1 Bus Gating Reset Register): bit 16 "UART1_RST", bits 15:1 reserved ("/"), bit 0 "UART1_GATING - Gating Clock for UART1, 0: Mask, 1: Pass". Sections 4.1.6.142-4.1.6.146 have the same layout for UART2-UART6. So these six entries should all use BIT(0); as written, enabling any of bus-uart1..6 sets a reserved bit and the UART clock stays gated. (bus-uart0 at 0xe00 BIT(0) and the uartN resets at bit 16 all match the manual.) 2) SYSDAP gate offset looks wrong: > +static SUNXI_CCU_GATE_HWS(bus_sysdap_clk, "bus-sysdap", apb1_hws, > + 0x88c, BIT(0), 0); Manual section 4.1.6.92 puts SYSDAP_BGR_REG at 0x07AC (bit 16 "SYSDAP_RST", bit 0 "SYSDAP_GATING"), and patch 8/8's reset map already uses { 0x7ac, BIT(16) } for RST_BUS_SYSDAP, so the gate here presumably wants 0x7ac as well. There is no CCU register at 0x88C in the manual. 3) Gates without a register in the public manual (V0.92) - these could use a short provenance note near the entry, as discussed for other IDs: - bus-spi4 (0x0F2C) - bus-sgpio (0x1064) - bus-lpc (0x1084) - bus-gmac1 (0x142C) [same question as the GMAC1 clock IDs] - bus-tcon-lcd2 (0x1514, and the tcon-lcd2 mod clock at 0x1510) - the manual documents only VO0_TCONLCD0 (0x1500/0x1504) and VO0_TCONLCD1 (0x1508/0x150C) - mbus-gmac1 (0x05E4 bit 12) - bit 12 is not described in the MBUS Gate Enable Register section The remaining bus/mbus gate entries in this patch all match the manual's offsets and bit positions. Thanks, Enzo