Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2166244rdb; Tue, 20 Feb 2024 21:36:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW64XlE5yeONLy7d/FP6lXZo65Ys0AL7XmVJHXm6jDXFhNCOb25AVt+SN6cBZbIjU7luOHwuD9XoHw1MLV9czOdpEbO7KuIlp/nJdJ8AQ== X-Google-Smtp-Source: AGHT+IFxwDK30r7vd3BvQbHtMl2C77LweD8NIIJcsYMYGC75ZE6Cngf9AM/KIvTxD1e/RKpizW6W X-Received: by 2002:a05:620a:448b:b0:787:7924:7892 with SMTP id x11-20020a05620a448b00b0078779247892mr4944828qkp.48.1708493783255; Tue, 20 Feb 2024 21:36:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708493783; cv=pass; d=google.com; s=arc-20160816; b=jzdHTl+Nx0Y+X4qjfY7q0t8yENAmYAn+UhX2rR+WO5sggp6wBuZ9qgdEeIwWbnjYlU bigF7hfwMBDwxgNKUso5MtlK14czsbcZIS25oHKOzqyZMBx2DIH4z0O6Ob4qrGxSnhKk DtvLyYFM/wTOOnscILQgXmmt+WvlWqsnP1G9Je2/qTV+8IEUivc3V/V2V07iI/n6cRAc zV7unOHAnayl2g9/yzDlkYJ4eEpza+KsMx1ZGbxCTl7ZxlXhpLAkalPS4GEBnFAJxBBM cdDlRiQsUKgvprGC+MFyozOd9l28hkNj6OlYRgAbtN1CsaaofDw7HvxYEbbegaJjZCHf euXA== 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=1RlkQfpmNo/f2fPrtidA94oB9YPALdbpum9iaOIZqgE=; fh=UhijDlGz4WYNx2y13BRHEKP9mVAyr2sRDgQuYnzbmVc=; b=xE5OgYDihXhv/xOq29kHzh/c4+dIYxP2kEeeqJYPio0eBjrw//VtIzahYuF0yM/ofy 0IaO38vG2jVd3aP5jDBeMjxbJ8EjbHzofJsvlli4UuuPiwjXkLxfq6z2pl91ESbqbIta MP2IykTz07oK/mf+cgPsLFi7BDC8i2s/GOImSoTjAW+rTLhrSQp3VbnrMQ8kmGwgFNjP 6b23zr/qdOOw1AAlv77oh7DOV9giP58NVaAMJY45r8nBu20nIunSCt1l7dsn8IoYLIYY YHV6tC7dhBoI5aF1ETuX21l6G7ITWGv800l0G5oHvhdwiobaJFpJYVOSb1e6M3k3Pm65 2O7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=ZavcdfGy; 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-74082-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x8-20020a05620a448800b0078780fb3ffbsi1897851qkp.422.2024.02.20.21.36.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 21:36:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74082-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=ZavcdfGy; 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-74082-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D2E201C20948 for ; Wed, 21 Feb 2024 05:36:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC9C039FFD; Wed, 21 Feb 2024 05:36:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="ZavcdfGy" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 3C310383BF for ; Wed, 21 Feb 2024 05:36:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708493769; cv=none; b=gq74FvI205o/vujHxISgzuqMEOcya+JREngq8Eg9tQ9+KnMbjY09KpUYTWQgdgbmQc4LaCCw0RIvMn8EjwJy3Xrz0sIjv8PkMLbJIlPoAIBzMMq7vWCcvrULU7kXuhSo3vhBiNUO45RbtxLOKJLuzTd0BAIR/fsNznofsn5M7A8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708493769; c=relaxed/simple; bh=FuiBfftLEwFkxk3vU6hA2AggO0C+Hxs9dZ/2FyCwT14=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=EB0WtbIwMRZiF0cbGLNxKHKOzCaKnHBk7C9oDEZRslWviA5WGRh3/JAUFdZkD4ZtE4+w/jL/14lWFyJVyskOeSr5hx2XuMdM6qv2gyv67HR1YbUWTUQ6Ol7TLwL74ISUZLUNM+wGmWOpD5lnu60xpyDD5USJeqZ/Fr+souW5hjk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=ZavcdfGy; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=1708493768; x=1740029768; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FuiBfftLEwFkxk3vU6hA2AggO0C+Hxs9dZ/2FyCwT14=; b=ZavcdfGySBe2wrBLR+ks1J9L0eHYMqi0gBQoieWjPreTpSTgF3ip1RvJ TQ2+IwGKwKHB6lS1ZhvVYmKMJizqKN0HR3Lpl/+a9hLCE5QrSg2LKmYkP vg4YHDynKOb7k6nzMOfHf0p8iKuNnZXX0YmsgWYanOBBkex6pJUv9Ek+c UC3Ah9MMzEcbC5vaclhmbd1LSUcxXXT8lMt+6iGFR1RLL7WUKLg/5WlPx 9lJ5gHWd3XbY8LO4pLK5Njb0RAskxlf23iv0SctWudUqm4zGFa/H9XT0b 15MGHP8VRUurvIqJy2DLWvd2Merw015t7na6BC9N05aGfYhfe2a7YtcOT A==; X-CSE-ConnectionGUID: c0sHMW5gRVmap0k+v/dH7w== X-CSE-MsgGUID: TVs2CH9ES9C0WQg/jlyrgA== X-IronPort-AV: E=Sophos;i="6.06,174,1705388400"; d="scan'208";a="16569306" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 20 Feb 2024 22:36:03 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 20 Feb 2024 22:36:00 -0700 Received: from che-lt-i67131.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 20 Feb 2024 22:35:52 -0700 From: Manikandan Muralidharan To: , , , , , , , , , , , , , CC: , , , , , , , , , Durai Manickam KR Subject: [PATCH v8 2/7] drm: atmel-hlcdc: Define XLCDC specific registers Date: Wed, 21 Feb 2024 11:05:26 +0530 Message-ID: <20240221053531.12701-3-manikandan.m@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240221053531.12701-1-manikandan.m@microchip.com> References: <20240221053531.12701-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 --- 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 ad732edfef0b..bc70a81b5275 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