From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 8C66630E0E9 for ; Sun, 31 May 2026 15:25:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780241162; cv=none; b=XYIi0w78c+aMaO+/zQt1qbjU78Z/7fbm/RXVWcEUMtkezgmImHEssE2iWNri810+3nwqK09d5PIs5a8zKuXpBY4/h/nkOGcSpRxAD1nWXMmVkF9loKifmMU6Rluoth2ZwY3AqFZq4TUYHRphKNkSQb6px/Yt1S27DnqX4k18NqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780241162; c=relaxed/simple; bh=OLRn0WPuowOpGkcllj26gGYuNaltNJ82CwrGWLvsHkc=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=ByiMfzziRRu+zqtqC8LnVSc+PkuCnoIKJXA1F9enLDEx0v1zmmMYBNk+njWc4hVOH2u7AzBCrz7vigX/cJh/b79goL5/xfC2ulJFaTXrveYtWkJf6ea/ISv71eIZReGC30tKoJbkSKo5OGkYT/31BFdYpLjUiipViQBcjhVwSRE= 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=POoRMYQL; arc=none smtp.client-ip=209.85.221.48 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="POoRMYQL" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-45efa0326fdso852256f8f.1 for ; Sun, 31 May 2026 08:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1780241158; x=1780845958; 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=DG2xp1hSIJeTvHYY9toNTecy4Wvd4sNJMjvyyolvm+4=; b=POoRMYQL9+Ys1cDaOWO8BLFAXLcF78vdL2r2smX/JBq5xUWSDalcmyO96FxHzvA4sa VOpt5+vYeQUdtSvhifllCDjBMaYCA3sKO/dzEuDFyGEubT+hgH9Q8p6npY6HcwlW58+F aw/oZJ3eBkZNDQ+ScwA3fdbPpA/FCWXG8tS+C9hPZ8lSNobyQUdq1wlcEjCnofW/+EMr isy/YvSKpV3DIj+cU/YSPSddXEnCtl2AWnGBBguY5N3Dx63sHLoD++231TIobpQSWM1m WuoI2Admz8jZMLIKNqfJu6B3iVijxyXFI2Hh7ZivNu1vVEO17zlb97W1qiEqCYB6Lz3D tRgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780241158; x=1780845958; 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=DG2xp1hSIJeTvHYY9toNTecy4Wvd4sNJMjvyyolvm+4=; b=Z7af22ahYa+VQJplZaDIAFihzX2CS/vhDBWFnATOH74SA3dIXBSc8wn+1zDxr49P55 GqD6EalzHp6bkqFjsks3uH9u5bcbVLwGsUvXacxnKaWgC/9LdN71009GZwV993mnaqVN O/gysJY1m02+ObyhXjVRyMrRjHsgn8f3IofkwiptO8DWDiaB2DRGb5RZJbjzCHbosxh+ Kq7hqFrTZ3sodzGPtD29NbDUHIDoMf65IAmwb9dtThrP3D1Wa0NdtfcCtPIuRCFtkYo5 ra9PcVBgkCcXTWyNdj3Zip+3v1RZa2RKX9GDjatIoqdjpbmf+bKWq0Hnzk6dUkRMsnoU 8MiA== X-Forwarded-Encrypted: i=1; AFNElJ/VfePIWgfcfIsZQOyn4nJis0SsIY7q7QEX/KkCbk/hO4MX4wTN8v7b6r4IoJ5hI1TX108vp6iUdHD47+o=@vger.kernel.org X-Gm-Message-State: AOJu0Yy8L+l07nuN48pAYsqoIvHhRTKSGXdNvwaRowfWF0D6JxN0Jdnu 5KjHNYE9HOLoUMRJkxy1RkrcLRXnzb+XXTkPJGW/SL0FQZ45tk2NvXGG+YZjGYWxdcQ= X-Gm-Gg: Acq92OHjBy3mv55/Te/hBt0rC26QMcsVfuEVGvtx3Xy4WFYCEruCXEO25tBh7PpxZ83 OhyQkZFe0CcgKC2XiXuTdGQFxgfSh0coeqVNMQIhgRm+lXH/Mwszniizvz8j9B+WUR1luNRqqUB E/SK1yt92zEqxmpHzCpuQzuYoiFZy/7FhXLyaaEebesdth4hu7l8FOsO2quD1Z0AF+CnrWAYrHs EcyaTn6SHUdeWC9v8wIC0kKobvVfQOyUCJl0Et489zyZn+6tIUyYjVCztfBdfXOVLLvCL7DlO/x yyDUBBdj4Btaz69D4S+jb1Hl0UrrVBXtVfGryIu58i4XBHhu/KJEIxG3u0DTbCD9Vco4WpEgObm XVDA0Xrj9si1GPdz/9lpytjt46REVsRCSV2jQC8oWfUPUTG1BAUP/l5lTrXECXc0+ZjZ0kXdk2z 3p7Km0I+nK73KRjWbiKkll1+b3nMN5uE59OMyhJf6faQ== X-Received: by 2002:a05:6000:2581:b0:45e:f8d0:d22c with SMTP id ffacd0b85a97d-45ef8d0d485mr12474042f8f.25.1780241157769; Sun, 31 May 2026 08:25:57 -0700 (PDT) Received: from [192.168.0.2] ([2a07:7e81:7daa:0:202:c9ff:fe53:eda4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef354cf0dsm18526622f8f.17.2026.05.31.08.25.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2026 08:25:57 -0700 (PDT) From: Angelo Dureghello X-Google-Original-From: Angelo Dureghello Subject: [PATCH v4 00/11] add mcf54415 DAC driver Date: Sun, 31 May 2026 17:25:53 +0200 Message-Id: <20260531-wip-stmark2-dac-v4-0-7e65ab4215dd@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/4WOzU7DMBAGX6XyGaP1bxJOvAfisFmvqYE2lR0CV ZV3xwkHBKTi+Ek7M3sRhXPiIu52F5F5SiUNxzrszU7QHo9PLFOoW2jQHqwB+Z5OsowHzC9aBiT ZgIdouxA6G0WlTplj+liND49fu7z1z0zjolku9qmMQz6vyUkvd9ftk5Yg2WBsfUsWUN33eH5Nf eZbGg6LbUWdMttopIDsgKJT+BNdfpvMd92B/aswVQFOW1SRFJlrda23UeV7BgzGoW826uqfuqq KtrFkPNpOQfilmOf5E18HIxq/AQAA 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 v4: - keeping changelog in each single patch, where any - Link to v3: https://patch.msgid.link/20260522-wip-stmark2-dac-v3-0-16be0ad35a67@baylibre.com 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 | 211 ++++++++++++++++++++++++++++++++++++ 7 files changed, 311 insertions(+), 24 deletions(-) --- base-commit: 9edf4183f0d32146b708220d56ee2d35905ba516 change-id: 20260430-wip-stmark2-dac-7060f49dd94f Best regards, -- Angelo Dureghello