Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp208393lqd; Tue, 23 Apr 2024 22:35:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWq4Nz3eGiqqDu3nRLtu+Tmj+Qy0RnnrZJhgTNqdJAKV3rqnOGbdDy+Z5s2cmEZs9vDcbAXF2FE3VgGwZsGAchwS2+HGHM9qA6CLgrGzw== X-Google-Smtp-Source: AGHT+IFTJZvdMCnGOl4QiW8/Woahs1dJhhhD7ipjZoSnKm8+52tSYDPucoCnThQTHuIAympGr/Gu X-Received: by 2002:a05:6a00:ac2:b0:6ea:bbff:7561 with SMTP id c2-20020a056a000ac200b006eabbff7561mr1959194pfl.11.1713936907397; Tue, 23 Apr 2024 22:35:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713936907; cv=pass; d=google.com; s=arc-20160816; b=xb76dVbl1m6g3G9UFNzEp3yCim3jsKlLJKafJ4Os9VePuTQtA6x4H23y6Pk+NgN1JP 4sC8Z+n6SB/FcA9rZNf+XYYnmvNIqtw021pDLTDQEUdJSK2RD6eRqC/Bg7w7DzQcuzRg nSjcFah7JaHJHMvzkdCb40CF6dXANzJUqXo6bLhx/wHk5W9PFe7ruBElqLN0Hsok555c MYu5lXPAGai912DAe2Gv0+kPYrBk24GFUBIpxJUtnX6oX08QgiXtbeMBCh3/vNj1U2oY VxSg7aM7w4CVT3unPIFkSrsBoXum3ZdEcczUcIGQQZmDmK+yuBJuj1Vc5FED4zk7Qsu6 JBsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=WWYuiBBsGwIL9d9sPEZIYwWWIVBtAhwxVkly0gpK1aw=; fh=2abPdPI/NwuIKEakfYEGnaMvckIrc2NiuwznXO+Tp/g=; b=f4EVSMehCfpjM9bF5SCIyvfbNKG03MF6kfUkYqQOLp2VVQ0759dO6nFfhS+vVuyNXJ W8MHSU7CZTKfhECDRnot1Rm2XzaNH8KvjgjSkCDNiWW9GvPrDSasbXVaVaRZuAvmvquG bhqlp9mV8qKaQ2FL5JsYiYF88B4IQJR8qXomT5Hzd5OwgJ2Otn1MuS48auBr1CxsIzA4 mmB+OgbPgO9BR5Duwtw2gbtbFz+kLfnTsZ0DzPDMjzqCRofQ3DFmBLX8YQ+0AJLEMSNy yg4jaXdEiaj88Jejvjgbd8ZA9q7t2Av60FbnXiyV2Jd1u8e2QxFT7zKq2O5/o55/96Du gwkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=q1Kv1THB; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-156311-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156311-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p6-20020a639506000000b006021d108d48si3434747pgd.601.2024.04.23.22.35.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 22:35:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156311-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=q1Kv1THB; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-156311-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156311-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E86C9B21A9A for ; Wed, 24 Apr 2024 05:35:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F597156873; Wed, 24 Apr 2024 05:34:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="q1Kv1THB" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 08ACF156666 for ; Wed, 24 Apr 2024 05:34:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713936893; cv=none; b=lM53jNd6NfRCeyc7v4s14sGEP1DUwvyCaUzqSMtVb2gEpFVL/ORfRQsjiWRrVWZw6gxCnPLQlNje02eS/JQQpxOusnIPIcWPBWDsqEZj0iJCLEFlptYWPlJ1GKJaTijVfSbftI9DN7rFLdo5igceojnI/4jr+HZCesBY5sGx10M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713936893; c=relaxed/simple; bh=pdPxed/ER9IiDp9ME+rn2hk3q1ClqZRiV2sB5ZU8XR4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eC+qN14d6istlxUI417QBDUJ2T4gQtk3Gia7Pj4XX3yvXfEi1oabaolbQTz88DyGGAoP+rDrMwcUdvS0FfKyGGxhjHDKJxyWeS9qYZkfunhnTrl4wRIt/a24sK9lmWBzLyVQz6l0hFQuOFRtgjq3N5OB9HuusKSyf8QmPIq7TkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=q1Kv1THB; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1713936891; x=1745472891; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pdPxed/ER9IiDp9ME+rn2hk3q1ClqZRiV2sB5ZU8XR4=; b=q1Kv1THBXfXZzjwAlecVz4ktZVgJxpNe6Gjp5Yvb462sQ/EWll5r2pyI HwuQAzB+Mjjmv/FQ6cn8GPwH8Xm1sVkBCLAq9z/UW+jxcRpyvzepfMfMX lzi7qn/dpwmYifzzklKnhz52MNaXlMxi5wwMO8fpSnYhdqmY6sidPpPoR 8KvJZNdMIvJPywkT3wnsrx4/g+94fQjtAvIUnhZv1zclUchyBJy+qqgbN dex+50LVC56rFdktmyj//BWIfe/rCQP89EvR8tNVMouVsQBmHRNnCp13Z 8QwfqsxNZntyeDaNZQpwWt5qYUUX9ur9ucko/oQv2adDPmlegUHBixWdQ A==; X-CSE-ConnectionGUID: PbptyM/7SruTa7hfwyXEEg== X-CSE-MsgGUID: QfTaV9MVTtONOBp1w3fY6Q== X-IronPort-AV: E=Sophos;i="6.07,225,1708412400"; d="scan'208";a="22373247" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Apr 2024 22:34:48 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 23 Apr 2024 22:34:40 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 23 Apr 2024 22:34:31 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , CC: , , , , , , , , "Durai Manickam KR" , Manikandan Muralidharan Subject: [PATCH RESEND v9 2/8] drm: atmel-hlcdc: Define XLCDC specific registers Date: Wed, 24 Apr 2024 11:03:45 +0530 Message-ID: <20240424053351.589830-3-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240424053351.589830-1-manikandan.m@microchip.com> References: <20240424053351.589830-1-manikandan.m@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain From: Durai Manickam KR The register address of the XLCDC IP used in SAM9X7 SoC family are different from the previous HLCDC. Defining those address space with valid macros. Signed-off-by: Durai Manickam KR [manikandan.m@microchip.com: Remove unused macro definitions] Signed-off-by: Manikandan Muralidharan Acked-by: Lee Jones Acked-by: Sam Ravnborg --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 42 ++++++++++++++++++++ include/linux/mfd/atmel-hlcdc.h | 10 +++++ 2 files changed, 52 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h index d0ecf0f58cce..c32e5c8809d7 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h @@ -15,6 +15,7 @@ #include +/* LCD controller common registers */ #define ATMEL_HLCDC_LAYER_CHER 0x0 #define ATMEL_HLCDC_LAYER_CHDR 0x4 #define ATMEL_HLCDC_LAYER_CHSR 0x8 @@ -128,6 +129,47 @@ #define ATMEL_HLCDC_MAX_LAYERS 6 +/* XLCDC controller specific registers */ +#define ATMEL_XLCDC_LAYER_ENR 0x10 +#define ATMEL_XLCDC_LAYER_EN BIT(0) + +#define ATMEL_XLCDC_LAYER_IER 0x0 +#define ATMEL_XLCDC_LAYER_IDR 0x4 +#define ATMEL_XLCDC_LAYER_ISR 0xc +#define ATMEL_XLCDC_LAYER_OVR_IRQ(p) BIT(2 + (8 * (p))) + +#define ATMEL_XLCDC_LAYER_PLANE_ADDR(p) (((p) * 0x4) + 0x18) + +#define ATMEL_XLCDC_LAYER_DMA_CFG 0 + +#define ATMEL_XLCDC_LAYER_DMA BIT(0) +#define ATMEL_XLCDC_LAYER_REP BIT(1) +#define ATMEL_XLCDC_LAYER_DISCEN BIT(4) + +#define ATMEL_XLCDC_LAYER_SFACTC_A0_MULT_AS (4 << 6) +#define ATMEL_XLCDC_LAYER_SFACTA_ONE BIT(9) +#define ATMEL_XLCDC_LAYER_DFACTC_M_A0_MULT_AS (6 << 11) +#define ATMEL_XLCDC_LAYER_DFACTA_ONE BIT(14) + +#define ATMEL_XLCDC_LAYER_A0_SHIFT 16 +#define ATMEL_XLCDC_LAYER_A0(x) \ + ((x) << ATMEL_XLCDC_LAYER_A0_SHIFT) + +#define ATMEL_XLCDC_LAYER_VSCALER_LUMA_ENABLE BIT(0) +#define ATMEL_XLCDC_LAYER_VSCALER_CHROMA_ENABLE BIT(1) +#define ATMEL_XLCDC_LAYER_HSCALER_LUMA_ENABLE BIT(4) +#define ATMEL_XLCDC_LAYER_HSCALER_CHROMA_ENABLE BIT(5) + +#define ATMEL_XLCDC_LAYER_VXSYCFG_ONE BIT(0) +#define ATMEL_XLCDC_LAYER_VXSYTAP2_ENABLE BIT(4) +#define ATMEL_XLCDC_LAYER_VXSCCFG_ONE BIT(16) +#define ATMEL_XLCDC_LAYER_VXSCTAP2_ENABLE BIT(20) + +#define ATMEL_XLCDC_LAYER_HXSYCFG_ONE BIT(0) +#define ATMEL_XLCDC_LAYER_HXSYTAP2_ENABLE BIT(4) +#define ATMEL_XLCDC_LAYER_HXSCCFG_ONE BIT(16) +#define ATMEL_XLCDC_LAYER_HXSCTAP2_ENABLE BIT(20) + /** * Atmel HLCDC Layer registers layout structure * diff --git a/include/linux/mfd/atmel-hlcdc.h b/include/linux/mfd/atmel-hlcdc.h index a186119a49b5..80d675a03b39 100644 --- a/include/linux/mfd/atmel-hlcdc.h +++ b/include/linux/mfd/atmel-hlcdc.h @@ -22,6 +22,8 @@ #define ATMEL_HLCDC_DITHER BIT(6) #define ATMEL_HLCDC_DISPDLY BIT(7) #define ATMEL_HLCDC_MODE_MASK GENMASK(9, 8) +#define ATMEL_XLCDC_MODE_MASK GENMASK(10, 8) +#define ATMEL_XLCDC_DPI BIT(11) #define ATMEL_HLCDC_PP BIT(10) #define ATMEL_HLCDC_VSPSU BIT(12) #define ATMEL_HLCDC_VSPHO BIT(13) @@ -34,6 +36,12 @@ #define ATMEL_HLCDC_IDR 0x30 #define ATMEL_HLCDC_IMR 0x34 #define ATMEL_HLCDC_ISR 0x38 +#define ATMEL_XLCDC_ATTRE 0x3c + +#define ATMEL_XLCDC_BASE_UPDATE BIT(0) +#define ATMEL_XLCDC_OVR1_UPDATE BIT(1) +#define ATMEL_XLCDC_OVR3_UPDATE BIT(2) +#define ATMEL_XLCDC_HEO_UPDATE BIT(3) #define ATMEL_HLCDC_CLKPOL BIT(0) #define ATMEL_HLCDC_CLKSEL BIT(2) @@ -48,6 +56,8 @@ #define ATMEL_HLCDC_DISP BIT(2) #define ATMEL_HLCDC_PWM BIT(3) #define ATMEL_HLCDC_SIP BIT(4) +#define ATMEL_XLCDC_SD BIT(5) +#define ATMEL_XLCDC_CM BIT(6) #define ATMEL_HLCDC_SOF BIT(0) #define ATMEL_HLCDC_SYNCDIS BIT(1) -- 2.25.1