From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 195C01A9FBC for ; Fri, 22 May 2026 21:21:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779484879; cv=none; b=C+QRtjKM5Ya5w2ByijTZSbLsYygzQ4XFW2lD9pU42amr14Qx2bjHhjLkqxIk75vKrUCkOw70cUH+HnlFJD/X/+XEDcIHYaTL2IGD+HtDaTH0znWE+LW72nZ82V0eB53yMTC3QS1n9Z8L06Z+i+FPxRkUtqL/eQZkg6soTH4OCdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779484879; c=relaxed/simple; bh=607PZRxfa+d0wJhhAMLDIIXWE7/SzukS8j1t2iw47pE=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=N96M1asWFDirwzLDETxi6FIaZliRq1+RplSfkaVJciJvfmXOzmur9/D8QKPLS5BGkmsLgVbJRI/2B8vMQnHqgkqnX0OQNYSoTj4DaHuuJf3j5XjY00if2Bm8/v92op+BRWZK5Hi1u+XqRdshOJPHMmyYsIz7HHjDC0zp/c2dJHc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=LQuuxKl5; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="LQuuxKl5" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-48ff4f8ef0dso81965555e9.3 for ; Fri, 22 May 2026 14:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1779484875; x=1780089675; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=3jZ2LpbUHZS3fbviqQINQwiQlZjuFtm/3mFTRxLA3Dk=; b=LQuuxKl5NbcHkajXRdBMVBXmIwgWQnfcKTgVXtV503gmy128ITKNE6T4gBbuvHnHqC /09eitza61Z0NxC/1Sfwto5rq6sliUsSjo2eEdy4PyWz9MSGnUu8U20hyC0vcXhMcAnN uEEEhluwKfE0AyMA2Kqu2hHLZ14YvRA51gM7Lb4kC/+e8MQFn6jx/J1C7RjmBTjlv3UD xuDB/LSEBLrK8Y7poRuwN+kY6GgMit/vytyBKJWoDaKOl5wG6ur9uO3oxeCNK6/RAIp6 rQD566wLqZzaw5UcFzEP+j/Fn85nX52CdmRAaze99Ra+n7tc49ps1NHDI+1T7j2+JduN PhEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779484875; x=1780089675; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3jZ2LpbUHZS3fbviqQINQwiQlZjuFtm/3mFTRxLA3Dk=; b=ZPuwrPfz2U0xR3Ea8VFl2BD2ZdoG4bJa9Wq1OEODU0F/yTtyEPXWA4kXtj+2RGW2Xr sEZOgnr07tvwRpONtiDSIBa3DiiZexgO/C7NjSjpGbWti03OQyARpBBlxZNuWHOrgX9V JtEwQJFBjvzMcdnSKoQIbW1DPRD7LrvqB1fiT/8NJ99MTKKRMpZblUu2ckjQnA1sAhjo 6oIktYyIHCS3OP6lkp7t8DEwUOcJ7kXHwEbsWG3Bpy/ki4JVwJ8zCd8y2htG2UQonxM7 VLZnjcM4tN4eepNDwLHt7oyMxU9p4D/stxTUX6sGyWjkRZJNAPq7Rm5Rp7DrTgZDyRrt dUhg== X-Forwarded-Encrypted: i=1; AFNElJ8OVg37xyJddxlvTjx9cJsAuTVfKX7OKH3pq895w5R3fY0GrB7z7L+/pHc0xVX8aZJLlS6n1TL4z6qHyzs=@vger.kernel.org X-Gm-Message-State: AOJu0YxiVPcrT+TjizDlVfvuFsKtrv/ndWMrncwKqeSE6kZ81M70Xt1m ZeHZxjiu4FcVqq4Fc0Jl98ZhSrPn+2CGXa6Afnw0WOqI0AHN7XITpkwUogrZRD+eZlo= X-Gm-Gg: Acq92OGS1wt7QKaUw1gOIZyHb6My4LL+P1MwQSOUvzAe8m1tbO0ruqVA8+DEWdv2m0B 0FURJszG9e8RfO7wCME6flWS7yTS5+qDjo0FXrkmuFCkV+5TaQKuVG4cuoX9iL5YlThgR9xegij KzRgzXAbNEmO6/deA5nG3xVY1zSNXFmfdm8VAUEAtyQuShrJGhKekAAYRxzrfuTulreyS3u7IFB aWK7ztOXmrQb7bXnLLXdVCQOB5mdsq7WPHOdyZ+CgBm1gTMbUMs6DUP3xiqiDsxoe8q7Ypf959f GMc8MOoHQ9mM7astfsR6o497ejTc4jstiyM9jqF7yOTsyz5MlIoaqzReWE/hf+yAszXV6i/nymT F9KFE0BClbb2uxkgixQ+8t7SeAHww31nmiSQhB/3HsyVb+wVgqyUHSNg/a5QlbWtm/lQpZ8hawi U8KZZZCoCVY6baQQ+jmF1HE4UE2Yg0Ahw= X-Received: by 2002:a05:600c:46cb:b0:489:1c1f:35f1 with SMTP id 5b1f17b1804b1-49042482762mr77587885e9.4.1779484875487; Fri, 22 May 2026 14:21:15 -0700 (PDT) Received: from [192.168.0.2] ([2a07:7e81:7daa:0:62cf:84ff:feee:627]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490454a0b82sm73312225e9.9.2026.05.22.14.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2026 14:21:15 -0700 (PDT) From: Angelo Dureghello X-Google-Original-From: Angelo Dureghello Subject: [PATCH v3 00/11] add mcf54415 DAC driver Date: Fri, 22 May 2026 23:20:28 +0200 Message-Id: <20260522-wip-stmark2-dac-v3-0-16be0ad35a67@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/4XOTU7DMBAF4KtUXmM0/kuTrnqPisVkPKYG2lR2C FRV7o6dLiqgiOWT5n1vLiJzipzFZnURiaeY43AswTysBO3x+Mwy+pKFBt2ANSA/4knm8YDpVUu PJNfQQLCd950NorROiUP8XMTd0zXn9/6FaaxMvdjHPA7pvExOut79rU9agmSDoW1asoBq2+P5L faJH2k4VG2pOmXuVwN5ZAcUnMLv1frbZG7rDuxvwhQCnLaoAiky6g6h/iFUIdq1JdOg7RT4H8Q 8z1+hJ30XhAEAAA== X-Change-ID: 20260430-wip-stmark2-dac-7060f49dd94f To: Greg Ungerer , Geert Uytterhoeven , Steven King , Arnd Bergmann , Maxime Coquelin , Alexandre Torgue , Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko Cc: Greg Ungerer , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org, Angelo Dureghello X-Mailer: b4 0.15.2 This patchset adds a minimalistic DAC driver for the NXP mcf54415/6/7/8 ibuiltin DACs. Currently the driver enables the raw write only. Feature as dma, sync, or format are not supoprted for this version. Additional options suppoerted by the DAC module will be added to the driver later on, as needed. The same patchset prepares the m68k/coldfire architecture to support the driver. Below soem basic tests done on stmark2 mcf54415-based board, voltage check on DAC0 and DAC1: ~ # cd /sys/bus/iio/devices/iio:device0/ /sys/bus/iio/devices/iio:device0 # ls name out_voltage_scale uevent out_voltage_raw subsystem /sys/bus/iio/devices/iio:device0 # cat name mcf54415 /sys/bus/iio/devices/iio:device0 # echo 4095 > out_voltage_raw /sys/bus/iio/devices/iio:device0 # echo 2048 > out_voltage_raw /sys/bus/iio/devices/iio:device0 # echo 4096 > out_voltage_raw sh: write error: Invalid argument /sys/bus/iio/devices/iio:device0 # cat out_voltage_raw 2048 /sys/bus/iio/devices/iio:device0 # Same behavior for /sys/bus/iio/devices/iio:device1. Generated a sine wave by shell script, sine shape is good. is actually in progress: Note: this patchset depends on mew mcf_read/mcf_write implementation that Link: https://lore.kernel.org/linux-m68k/209d0653-6386-4b64-9e15-e358f84453ab@app.fastmail.com/T/#t Link: https://lore.kernel.org/linux-m68k/20260506142644.3234270-2-gerg@kernel.org/ --- Changes in v3: - keeping changelog in each single patch, where any - Link to v2: https://patch.msgid.link/20260513-wip-stmark2-dac-v2-0-fcdae50cf51a@baylibre.com Changes in v2: - keeping changelog in each single patch, where any - Link to v1: https://patch.msgid.link/20260504-wip-stmark2-dac-v1-0-874c36a4910d@baylibre.com To: Greg Ungerer To: Geert Uytterhoeven To: Steven King To: Arnd Bergmann To: Maxime Coquelin To: Alexandre Torgue To: Jonathan Cameron To: David Lechner To: Nuno Sá To: Andy Shevchenko Cc: Greg Ungerer Cc: linux-m68k@lists.linux-m68k.org Cc: linux-kernel@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-iio@vger.kernel.org --- Angelo Dureghello (11): m68k: mcf5441x: fix clocks numbering m68k: mcf5441x: add clock for DAC channel 1 m68k: mcf5441x: initialize DAC clocks by iio DAC driver name m68k: defconfig: update stmark2 defconfig m68k: add DAC modules base addresses m68k: mcf5441x: add CCM registers m68k: mcf5441x: add CCR MISCCR2 bitfields m68k: stmark2: use ioport.h macros for resources m68k: stmark2: add mcf5441x DAC platform devices m68k: stmark2: enable DACs outputs iio: dac: add mcf54415 DAC arch/m68k/coldfire/m5441x.c | 21 ++-- arch/m68k/coldfire/stmark2.c | 47 +++++--- arch/m68k/configs/stmark2_defconfig | 2 + arch/m68k/include/asm/m5441xsim.h | 42 ++++++++ drivers/iio/dac/Kconfig | 11 ++ drivers/iio/dac/Makefile | 1 + drivers/iio/dac/mcf54415_dac.c | 207 ++++++++++++++++++++++++++++++++++++ 7 files changed, 307 insertions(+), 24 deletions(-) --- base-commit: 9edf4183f0d32146b708220d56ee2d35905ba516 change-id: 20260430-wip-stmark2-dac-7060f49dd94f Best regards, -- Angelo Dureghello