From patchwork Wed Feb 27 16:24:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10832653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F8561575 for ; Thu, 28 Feb 2019 08:29:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 407F32D516 for ; Thu, 28 Feb 2019 08:29:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 327842D55E; Thu, 28 Feb 2019 08:29:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C50972D516 for ; Thu, 28 Feb 2019 08:29:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F35B16E15A; Thu, 28 Feb 2019 08:28:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from esa6.microchip.iphmx.com (esa6.microchip.iphmx.com [216.71.154.253]) by gabe.freedesktop.org (Postfix) with ESMTPS id 03BB66E0E4 for ; Wed, 27 Feb 2019 16:31:58 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.58,420,1544511600"; d="scan'208";a="24548773" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Feb 2019 09:24:51 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.49) with Microsoft SMTP Server (TLS) id 14.3.352.0; Wed, 27 Feb 2019 09:24:48 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1806.namprd11.prod.outlook.com (10.175.53.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.21; Wed, 27 Feb 2019 16:24:45 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::54fe:95ed:b0cf:55a6]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::54fe:95ed:b0cf:55a6%8]) with mapi id 15.20.1643.022; Wed, 27 Feb 2019 16:24:45 +0000 From: To: , , , , , , , , , Subject: [PATCH 7/7] drm: atmel-hlcdc: add sam9x60 LCD controller Thread-Topic: [PATCH 7/7] drm: atmel-hlcdc: add sam9x60 LCD controller Thread-Index: AQHUzrjzhXThqsOX3Eqi2hwybUgnVA== Date: Wed, 27 Feb 2019 16:24:45 +0000 Message-ID: <1551284609-14594-8-git-send-email-claudiu.beznea@microchip.com> References: <1551284609-14594-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1551284609-14594-1-git-send-email-claudiu.beznea@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0112.eurprd08.prod.outlook.com (2603:10a6:800:d4::14) To MWHPR11MB1549.namprd11.prod.outlook.com (2603:10b6:301:c::17) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b8de43c5-d881-4205-9be7-08d69cd015cb x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:MWHPR11MB1806; x-ms-traffictypediagnostic: MWHPR11MB1806: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; MWHPR11MB1806; 23:9pIYsZNliCGrvRinfpfNAu0JwE9VeEt3FLtOHSp?= =?iso-8859-1?q?IEaCatHGlXZaPy3?= =?iso-8859-1?q?0J65QHHYzb+IRL4JYP/Mat1Ioa06SdsUFqbRzZ2ETbSy8BiFY6Vovk5fnzCO?= =?iso-8859-1?q?DsPvw4Hv7cYce2uwRRejN90K/HFucrHgSPI33i3tys0KxYL+mmy9XRhnNgSF?= =?iso-8859-1?q?fCiFy/0kpnAYhiXJJm1+M8zUZc3Rl3B8fovzSREPm+A+Hs0u4f9iK3Qs6A1N?= =?iso-8859-1?q?vef1TNjESvf2g++Ire1tIOsdxVcYGQRbUU9HuAhI7FJ2lhbef4mQnPIEhifc?= =?iso-8859-1?q?t5hfihmbHD6cS9cdR4bB749VVeXtQyPA3hmKXnjL02LMeXjDDuNxr6LM2MzM?= =?iso-8859-1?q?TViyz1n5ngB3Ue6RRhmRDKsNcuAtAqnkM/spILjAD283hDRnOwfpQDopJZCx?= =?iso-8859-1?q?TEsrLoJww+qUPknLOnI0UEwrjpx3Tokh9ndrVmbHDKOVPoTCGQctZUJ5/Obz?= =?iso-8859-1?q?OUN8sNc/q7xnmUN+zeDidXedOkBb26dw75TpnoCoBNmytYi1vzHIwcS8NTrB?= =?iso-8859-1?q?JkF9EObPApvWgg+cD0u7p/RRa8ms/7HP2uYnkIkxT3iFGsZJ5yPPTLXr9YYz?= =?iso-8859-1?q?w60T1unno+cN+lUQHRaMUVULn8ngx0LvxfJcox0ABzRCjoAebYucZUUZkyIU?= =?iso-8859-1?q?N00JQUNFzi8UZLbFtCNvrKjuPl10ed8vsVWQIX+ayF/MYwxZKNq7lYFxIdpn?= =?iso-8859-1?q?D/h/qamwo4GA8TWvaq6nEEZoTF4PKnYPOURHY0wmKcYT+FFoBdUM3ccoHfdp?= =?iso-8859-1?q?LQiqCM+7bLXgiZQfm4yBVD17S56Zmb4AO+O5ziKc9hWPjx46/aEFtE5wor0y?= =?iso-8859-1?q?RU95TVDcXC1R1HI2hM8IpswJvG5Qs3lngL00CXv6l0qC8gdN06Y44wc4mzYT?= =?iso-8859-1?q?jaJnVhVkvnbPaw7ru4fsiHMOGlEhAMzReq1unVk5sgtD+L7PFdNveJ6W3RYO?= =?iso-8859-1?q?Fqm0ntDZmFmlMsLh+rQVLOot5s7aPmcIXjR0N8e1oQRhV/HeGsM5Xw5eC1DL?= =?iso-8859-1?q?jPfChzUG5VnH+JMRxZ1mCH4ycFRI7q65lCdvsi1bMpgFDsW5d/iS8Akmy2/B?= =?iso-8859-1?q?1X6vJjUb7/zkSOiOpOQgAEUZmJkU7HW0ljgZP+ET5mssFL5mYXXzzYSceMGV?= =?iso-8859-1?q?QDdOEwjVrLlo4q2eZbv5ZaPXsE1PXYUxdE4K4BjOsfs9AVDI5lFtc9KWF9l9?= =?iso-8859-1?q?Fd7Hkq8dfoO/YTGUOdZwthAKKkRdYrtYnuWNJTNiWi7qnNCRWesrBUY6ev3S?= =?iso-8859-1?q?/IvQpMN9l3WDoRcc978J5k/McXsl3caSdEmwUoaQBW5rvtEpquSozCYgBJA4?= =?iso-8859-1?q?Gd8J3FJzw=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 0961DF5286 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(396003)(366004)(136003)(376002)(189003)(199004)(11346002)(105586002)(25786009)(6436002)(8936002)(36756003)(4326008)(66066001)(6486002)(486006)(476003)(76176011)(50226002)(52116002)(186003)(107886003)(72206003)(99286004)(478600001)(2616005)(7416002)(68736007)(110136005)(14454004)(2201001)(71190400001)(6116002)(6506007)(86362001)(446003)(71200400001)(386003)(97736004)(8676002)(3846002)(53936002)(81156014)(54906003)(81166006)(256004)(2501003)(316002)(305945005)(6512007)(7736002)(26005)(102836004)(2906002)(106356001)(5660300002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1806; H:MWHPR11MB1549.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 1q5IbQuRI4j4LkZp6z3nGANPmILGqkxeiAXTGh/YHLTOSHNRutAdA+2XWphDdowpyH0SaOvCVvGBgfkbVAQTIUc9cLtoaGe5y0D4+nptNwH6ZEIDEARDQ+GSt1x691jtx2NaRx3wh5lJnMMQRzRXx1f1O8V4+iUfqbrO9cxpmE/9pEy6b5qWb/bwk9TvBBKcj4wzeEtT0EIZP/D4u6FomWJo1Tn5pIYWM7TilJ8XlkAw02yQk9wBKC4dOEST2DJesOHlO0lEWoI6vhRWxjZznNdNG4X453WTTAx2UouOlZOuqMbLasxGlr/5nvkrKP6GygBxRgqVTVKD0XKQHewC7iivpLmC80RLeQBf88WJ81UpPCYlLaC/he+Cwc9shae5RWaJTagWHgqYagwYBl0EcH1lsMSomdSzuIeZ4PGERPQ= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b8de43c5-d881-4205-9be7-08d69cd015cb X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Feb 2019 16:24:40.7382 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1806 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Thu, 28 Feb 2019 08:28:56 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W+HE41CyiCB05c1+dpayBAnxqXSg/ka725qhPH7sep8=; b=XBZ9cMt5g6Lawo+G53d3KYNfd7mNYwnRfd3IYApI+qWAo0edEVujFpL+sGcYbDs5AWSJKHjn55WY/X4yWtwWdAq2MRrhupvystYpxZJZOs9nFmYZzkdYSdmttHqjCaKgEpuZJ12SbRTE1v69bL+MnZ2xFXw9T4/efD2kt4ciFpk= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Claudiu.Beznea@microchip.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sandeep.Sheriker@microchip.com, Claudiu.Beznea@microchip.com, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sandeep Sheriker Mallikarjun Add the LCD controller for SAM9X60. Signed-off-by: Sandeep Sheriker Mallikarjun [claudiu.beznea@microchip.com: add fixed_clksrc option to atmel_hlcdc_dc_sam9x60] Signed-off-by: Claudiu Beznea --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 101 +++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index 8bf51f853721..fb2e7646daeb 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -364,6 +364,103 @@ static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sama5d4 = { .nlayers = ARRAY_SIZE(atmel_hlcdc_sama5d4_layers), .layers = atmel_hlcdc_sama5d4_layers, }; + +static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sam9x60_layers[] = { + { + .name = "base", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x60, + .id = 0, + .type = ATMEL_HLCDC_BASE_LAYER, + .cfgs_offset = 0x2c, + .layout = { + .xstride = { 2 }, + .default_color = 3, + .general_config = 4, + .disc_pos = 5, + .disc_size = 6, + }, + .clut_offset = 0x600, + }, + { + .name = "overlay1", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x160, + .id = 1, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .cfgs_offset = 0x2c, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .pstride = { 5 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + .clut_offset = 0xa00, + }, + { + .name = "overlay2", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x260, + .id = 2, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .cfgs_offset = 0x2c, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .pstride = { 5 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + .clut_offset = 0xe00, + }, + { + .name = "high-end-overlay", + .formats = &atmel_hlcdc_plane_rgb_and_yuv_formats, + .regs_offset = 0x360, + .id = 3, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .cfgs_offset = 0x4c, + .layout = { + .pos = 2, + .size = 3, + .memsize = 4, + .xstride = { 5, 7 }, + .pstride = { 6, 8 }, + .default_color = 9, + .chroma_key = 10, + .chroma_key_mask = 11, + .general_config = 12, + .scaler_config = 13, + .phicoeffs = { + .x = 17, + .y = 33, + }, + .csc = 14, + }, + .clut_offset = 0x1200, + }, +}; + +static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sam9x60 = { + .min_width = 0, + .min_height = 0, + .max_width = 2048, + .max_height = 2048, + .max_spw = 0xff, + .max_vpw = 0xff, + .max_hpw = 0x3ff, + .fixed_clksrc = true, + .nlayers = ARRAY_SIZE(atmel_hlcdc_sam9x60_layers), + .layers = atmel_hlcdc_sam9x60_layers, +}; + static const struct of_device_id atmel_hlcdc_of_match[] = { { .compatible = "atmel,at91sam9n12-hlcdc", @@ -385,6 +482,10 @@ static const struct of_device_id atmel_hlcdc_of_match[] = { .compatible = "atmel,sama5d4-hlcdc", .data = &atmel_hlcdc_dc_sama5d4, }, + { + .compatible = "microchip,sam9x60-hlcdc", + .data = &atmel_hlcdc_dc_sam9x60, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, atmel_hlcdc_of_match);