From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel-space.org (v2202511311555398556.powersrv.de [46.38.245.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E41323E4C96; Mon, 4 May 2026 17:17:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.38.245.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777915044; cv=none; b=qQFDau8bQMbsRUt7/RaOF9NaohthV9CMWq28HlbwYqATaIeH+Yi91Udwx05Xu2apOpULSsTApI0nTTVJxHO+ngXJffgXKveW3yZC7wt5yDnH9oWLHTZP/pxKCjafaBPwN3S/rpsRCdSU5W8IPuqytD4bgs1U6FcHDks9DB33LF8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777915044; c=relaxed/simple; bh=LEoXmLzP8u1byop8FDTRBhZ5Z22QUE2UD2zdAdad/Jw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UzN1JHqfFnxDJK6vmkjbw9eUmpqySixadQ43WwBSMheDB+0ClpNwXzC9woIUERZw9lP2ORS2V+FEnMY5lSWHiHNPcb0R4S/UyibDdY1lFAiBFG+laLL/irZ0A866D6cbn86puJe5mEP9lQwFmntAacEZ2iSEMOt/XJXVLotI1uQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kernel-space.org; spf=pass smtp.mailfrom=kernel-space.org; dkim=pass (1024-bit key) header.d=kernel-space.org header.i=@kernel-space.org header.b=iLg/MXtU; arc=none smtp.client-ip=46.38.245.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kernel-space.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel-space.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kernel-space.org header.i=@kernel-space.org header.b="iLg/MXtU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-space.org; s=s1; t=1777915006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k1f7lV1i+r+6Lv1WVQN+EfQy8NFT78JqLVT0pvpLNVQ=; b=iLg/MXtUWb5ZCYGjJG85EyQ8vX+B2wx//mvd1xmEWOBK2JTI+AmfdVIDI5zec2l4I0PfGl KZxwJiWfE+uaAX5RJWzft4QTXPESRLPeRvSYZN+JUnm0PameHLRZayyHdxwAQ62bv7vEDM LD/MhbyolFAelaT+TvviDPYdH34+i5U= Received: from [192.168.0.2] ( [2a07:7e81:7daa:0:62cf:84ff:feee:627]) by oreshnik (OpenSMTPD) with ESMTPSA id 66349e3f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 4 May 2026 17:16:46 +0000 (UTC) From: Angelo Dureghello Date: Mon, 04 May 2026 19:16:47 +0200 Subject: [PATCH 09/10] m68k: stmark2: enable DACs outputs 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: 7bit Message-Id: <20260504-wip-stmark2-dac-v1-9-874c36a4910d@baylibre.com> References: <20260504-wip-stmark2-dac-v1-0-874c36a4910d@baylibre.com> In-Reply-To: <20260504-wip-stmark2-dac-v1-0-874c36a4910d@baylibre.com> 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 From: Angelo Dureghello Enabled DAC0 and DAC1 outpus disabling shared ADC inputs on ADC3 and ADC7. Signed-off-by: Angelo Dureghello --- arch/m68k/coldfire/stmark2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/m68k/coldfire/stmark2.c b/arch/m68k/coldfire/stmark2.c index 30da9bcbfd63..8fdfb9415cd7 100644 --- a/arch/m68k/coldfire/stmark2.c +++ b/arch/m68k/coldfire/stmark2.c @@ -137,6 +137,8 @@ static struct platform_device *stmark2_devices[] __initdata = { */ static int __init init_stmark2(void) { + uint16_t val; + /* DSPI0, all pins as DSPI, and using CS1 */ __raw_writeb(0x80, MCFGPIO_PAR_DSPIOWL); __raw_writeb(0xfc, MCFGPIO_PAR_DSPIOWH); @@ -149,6 +151,12 @@ static int __init init_stmark2(void) /* CAN pads */ __raw_writeb(0x50, MCFGPIO_PAR_CANI2C); + /* Enable DAC0 and 1 */ + val = __raw_readw(MCF_CCM_MISCCR2); + val &= ~(MCF_CCM_MISCCR2_ADC3_EN | MCF_CCM_MISCCR2_ADC7_EN); + val |= MCF_CCM_MISCCR2_DAC0_SEL | MCF_CCM_MISCCR2_DAC1_SEL; + __raw_writew(val, MCF_CCM_MISCCR2); + platform_add_devices(stmark2_devices, ARRAY_SIZE(stmark2_devices)); spi_register_board_info(stmark2_board_info, -- 2.54.0