From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 A3FE4480943 for ; Wed, 10 Jun 2026 20:35:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781123714; cv=none; b=lx50ac9t793erxvdZFfH7AXtPjM+cyLSaeddF7oQKe4Afc4kZpJAXTMMHeqeA2jIVxRaLmQiZ0Bd1YTsY30rvIj4TThRSdP2ypY9tp0hfCUqb6YU9FxwtwzFKHgsM2rneKRaWp4dGC+2qeNw3MYicLCh7AinNoPAuy3pzTRgJmo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781123714; c=relaxed/simple; bh=DfQ3P2bQ2EvWGbkuEOTmf9qixrRKxvxvLXH1fQ704HA=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=CTxp1qw9y5fiOpffbwvpKQhr//IfsG06carVN/1ijzPD0VKUiKlcZsKRZn5oo/k85jkk9GdGIb2YxVVDCEtIdZoRSiPipibsHWNB0RFdxjNMRYuI8UyX5YG/TaIfXFMfO2sFHrLe3Jk+3NCddp4ns+2A2LXN2aSTfVOItqW4TaI= 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=F2LICWHt; arc=none smtp.client-ip=209.85.128.51 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="F2LICWHt" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-490b2b037d2so63188615e9.3 for ; Wed, 10 Jun 2026 13:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1781123710; x=1781728510; 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=0uD+V1MP1IrfqCSKgnnEBQvMXliLpNg3JmnXmkFW/Zc=; b=F2LICWHtkCMnqy4Z6JoObNJa51LaGZmPDb+LFs3QW5/BmLaVKuldeY6E6b2U33RcjB biEG89iRIOMv8eUzchnbVBgtCWczrhGDE8HroQRmUmX7yFmwVVXZycH4/1wmJMB9S1pl yrTIFrd83RfgSug+udhG1Xgg6lCG340ZG0+WIM9L3UEzq3DjbbDCiQGN++iTPMrWgSG4 4WImHSd4LxGRPx3vNlrVxtdVbv4dD3NgOZoCJNNZQdkPGADqlSOFIs7YwVdIwLkZ9dJZ s06WO60UAwrN9FAahPC9jlScuxStLemcbeBdDn+IwiR3mGGjCYZUKIqMDmS31uXL7hYu YBkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781123710; x=1781728510; 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=0uD+V1MP1IrfqCSKgnnEBQvMXliLpNg3JmnXmkFW/Zc=; b=BT5EvpPhCB0/5Nvn9Z5R9dSetanC0FWrRV1CF7kUSOPyhUixMpfwf0+ISPpqmirhHi gRMBI8wI9Sz9123tYFtNns9bE6k14mYIbXcikQNRXZnG051lRsOfvXYnGzHCJVUvExeh /YLRaBjmsz3IPXHTZZ82JKN4EBT5HNXPnimiSK6MOffgKaFf1I5UJ0vw0D81ZSWFwEZo 2xbq3XW8g5bxv2BH50EU9VX+ukyn1VTTT4ZkiFKft1HYb9FGBKtkONfgW0rKRSVIpfKJ 0Di+/oBrKCBMU24ts8vJBE0F17huzm6JggYI65p2LAYW1keNeKEvQmBnLnpiB45sFOjt /McQ== X-Forwarded-Encrypted: i=1; AFNElJ8nmH7DVNn62xz0Wy2IL49Fl8G2ri3NT0/HGDT1Ru8W56vUqRnGHBXX860n3Ls/dSi7cgeOunu+81U232o=@vger.kernel.org X-Gm-Message-State: AOJu0YzbyIZeo7Xgs4Xy3+EyyHJEcUmeCnZfrGNxbeTVyxjhkL8IsqT2 Xu+b+Q9/P6UJ6/I3K3JxQg0RsWbArmbwDIZLMzDa0dSka6C1pVPs81uIas2oFyILuL4= X-Gm-Gg: Acq92OE2xx2dSbnAbEmd0ovAykLm1Rh+weTgzuK2n/EyHbLcOy0Dwg6SEAChW5zM32/ 4kZDIQtw0ebCS03Aax6y2ZeqtJ8hg8/t7QDie1g0GtWDrz5x1pndXse2owbf6ALxjZ7iLbrr+h7 xmScklj0OnnofBmz76j0CfY9Dd/mjtuFPECF1/tG3uYcKDdsaEZ+dP9q/84kRZoDZouoEuvoXWo AC30tdKBpRuvSVjE3kkRuiWc/awyvOF32zTnYvvLCTsKaeCrSwgbuh+0fATODDKMYAxElHCmtF6 uQ1l89c4yTh21zkaNoWbkfH9LWzdcMzAj2x8JOfVy24ESPVxYA9nE2shDLUT1VSvIaGHEEPrp3k TyDzpinagDBG3f8H+CF8dY9SIJ8QZEn+0u5aav0I9jBRF/bN2dE9h1BW0pYZEo4s/hsKbFN6+li fj+LmcCLpYZBvGDqHUSarpFl8jRZof9UjIJgk8tzfFsg== X-Received: by 2002:a05:600c:1f89:b0:490:e1a6:4d13 with SMTP id 5b1f17b1804b1-490e2d27954mr6307175e9.15.1781123709975; Wed, 10 Jun 2026 13:35:09 -0700 (PDT) Received: from [192.168.0.2] ([2a07:7e81:7daa:0:202:c9ff:fe53:eda4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490dc4715e4sm62390975e9.0.2026.06.10.13.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 13:35:09 -0700 (PDT) From: Angelo Dureghello X-Google-Original-From: Angelo Dureghello Subject: [PATCH v5 00/10] add mcf54415 DAC driver Date: Wed, 10 Jun 2026 22:35:05 +0200 Message-Id: <20260610-wip-stmark2-dac-v5-0-b76b83366d5c@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/4XOy07DMBAF0F+pvMZoxq+krPgPxGJij6mBNpUdA lWVf8cJCx5NxfJKc8+dsyicExdxtzmLzGMqqT/UYG82wu/o8MQyhZqFAuXAaJDv6SjLsKf8omQ gLxtwEM02hK2JoraOmWP6WMSHx69c3rpn9sPMzBe7VIY+n5bJUc131/VRSZCsKbau9QYI7zs6v aYu863v97O2VC3q9Wr0gdiCjxbpd3X+bdTf6xbMJaErAVYZwujR62vrSq1X0XUMFLQl16ys4z/ rWIm2MV47MluEsEKYH4TGS8JUomFnqTMKbfhLTNP0CU94Sd0CAgAA 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 builtin 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 some 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 v5: - keeping changelog in each single patch, where any - Link to v4: https://patch.msgid.link/20260531-wip-stmark2-dac-v4-0-7e65ab4215dd@baylibre.com 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 (10): m68k: mcf5441x: fix clocks numbering m68k: mcf5441x: add clock for DAC channel 1 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 m68k: defconfig: update stmark2 defconfig 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 | 216 ++++++++++++++++++++++++++++++++++++ 7 files changed, 316 insertions(+), 24 deletions(-) --- base-commit: dcf93520157c17ddfb1f43b66fcdda27714ff1dd change-id: 20260430-wip-stmark2-dac-7060f49dd94f Best regards, -- Angelo Dureghello