From patchwork Tue Mar 5 10:08:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 10840529 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 883271575 for ; Wed, 6 Mar 2019 08:09:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 753362CAFD for ; Wed, 6 Mar 2019 08:09:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 686262CC68; Wed, 6 Mar 2019 08:09:54 +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 EAD9A2CAFD for ; Wed, 6 Mar 2019 08:09:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B71E36E0B7; Wed, 6 Mar 2019 08:09:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from esa1.microchip.iphmx.com (esa1.microchip.iphmx.com [68.232.147.91]) by gabe.freedesktop.org (Postfix) with ESMTPS id D4C1889C53 for ; Tue, 5 Mar 2019 10:08:15 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.58,443,1544511600"; d="scan'208";a="28727168" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Mar 2019 03:08:15 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.105) with Microsoft SMTP Server (TLS) id 14.3.352.0; Tue, 5 Mar 2019 03:08:13 -0700 Received: from MWHPR11MB1549.namprd11.prod.outlook.com (10.172.54.17) by MWHPR11MB1647.namprd11.prod.outlook.com (10.172.55.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.21; Tue, 5 Mar 2019 10:08:11 +0000 Received: from MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::54fe:95ed:b0cf:55a6]) by MWHPR11MB1549.namprd11.prod.outlook.com ([fe80::54fe:95ed:b0cf:55a6%9]) with mapi id 15.20.1665.020; Tue, 5 Mar 2019 10:08:11 +0000 From: To: , , , , , , , , , Subject: [PATCH v2 7/7] drm: atmel-hlcdc: add sam9x60 LCD controller Thread-Topic: [PATCH v2 7/7] drm: atmel-hlcdc: add sam9x60 LCD controller Thread-Index: AQHU0ztWsecK/da2U0+4KoK8RYPaoA== Date: Tue, 5 Mar 2019 10:08:11 +0000 Message-ID: <1551780434-4580-8-git-send-email-claudiu.beznea@microchip.com> References: <1551780434-4580-1-git-send-email-claudiu.beznea@microchip.com> In-Reply-To: <1551780434-4580-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: VI1PR0502CA0011.eurprd05.prod.outlook.com (2603:10a6:803:1::24) 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: 86ec419d-02b2-4943-fa98-08d6a1527909 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:MWHPR11MB1647; x-ms-traffictypediagnostic: MWHPR11MB1647: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; MWHPR11MB1647; 23:KuDGC6htkbBka4uCi+d6Otr6Tjz3fZljgwc8dOT?= =?iso-8859-1?q?LZBSVnhK+IQVqN2?= =?iso-8859-1?q?lSECLluTLuFr6HVUmYKV28UmuVz8dOoZf0NP6bXN3KCnM9C/5EMbGAW9P2oE?= =?iso-8859-1?q?Bwu9JCzkCAVpsb+ClWLRT8dD9+Ljg3AzEnNwN3n7NHL3X0ByRYqqNs7aP7OD?= =?iso-8859-1?q?173/zlKYGtwzTpMX1Yz8OCgHX8t7Mz2mOanu6x9jfTguvKfVIun8+yzqpkNA?= =?iso-8859-1?q?tmKcPUXdn40QHutpc+92LBrQ+ztpISoymAzVAWg8OjMXSEBIizJonJ1LR9Sa?= =?iso-8859-1?q?AJPFO8+GCf1kNW1y+YiYnbLPpRGqWVmThnWPtuEzw/0JEN8e3EzYNIY/R6tb?= =?iso-8859-1?q?oMSqRBV8k8rhZNr43uv9lBBbBCpi6qJqidGoCK7+IvXsoN3+vA+n4GWFRKIc?= =?iso-8859-1?q?94k4/lYZD7F2bLbcas4B4md0A8qge3iLtNopRVZOIo2XlpUGTqnxcr69w0Pr?= =?iso-8859-1?q?lsCizpUDY8sZbKDWVFjDGZ7UY13R1EVfbgFxbmFn0WEA4ep4Ki17CWOFeaPk?= =?iso-8859-1?q?KClpvTMnhCbegvF51kXX6du1x0+ExIMO0LOSge58O4glZn+CSbFa+hV1voym?= =?iso-8859-1?q?xAbCUBwT8XU1DMM6iWbCmW3eWYAi1uWrtRf9otrHwRPmpx++StE6Hon7nqkp?= =?iso-8859-1?q?JmrIYWzZdR/vFsOIIkXFgLYM5qjKSw8OxiKLKUrO8mAnCETNgeHeYdaG2Jpq?= =?iso-8859-1?q?D8VTY4sFl+QOpfZIwPn22I4M+0CQUlUmoJqaTYXzfxEDKh9m2FH5H07G8E/c?= =?iso-8859-1?q?qUg6L9+rGyAc5QGf2dFFfB7nfhsMMXfMkVBO/EkK+AJiaMKsyvv7jBY2BYJs?= =?iso-8859-1?q?RansFJIR27VLzWX3m3lwtujGm0lvasNsBbnfjEC4nF2qEmEhvMCM1uz9zHPD?= =?iso-8859-1?q?/fMwjEKsIpuEmKS69/NYEYqyg/F62yXn0gpMUW+ZcxoA3TVc6c6ezHL3BL3x?= =?iso-8859-1?q?BwFurouyEPTCiV81y2OVXRmhU+M47lWYKT7szAPBC02ifrb9sL/ctJlWekdS?= =?iso-8859-1?q?FDU2AcAdb6f13bbspUXDFCv2odVd2SPqxM6nLncVsRahS+/9oYqsyPS++VAT?= =?iso-8859-1?q?Cb3dhuu9clE2l+CtYhRqSyf/lj6wcllIxI+cuWz+8zO+hPYC3Vz+s4Vukrss?= =?iso-8859-1?q?gjTDqvI3CK0XK4SaBbVjiGbwCybBq3li8C+nLlx00nqnLuC0lEfooORa6oXU?= =?iso-8859-1?q?xlg4nkjkWHQivWcK7Di10epSvShlMlDYVXo40g3kTIkv72GrOcXsHAfy08ck?= =?iso-8859-1?q?VE6l+BXkcR5CEMUhLWjmsBqCr/up74+X0V7ZveAppxdjfLx/OVuPvoZsXAb1?= =?iso-8859-1?q?B19SaOEyI=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 0967749BC1 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39860400002)(346002)(136003)(366004)(199004)(189003)(106356001)(72206003)(3846002)(99286004)(81156014)(52116002)(36756003)(76176011)(14454004)(81166006)(66066001)(8676002)(110136005)(6116002)(105586002)(6486002)(7736002)(5660300002)(8936002)(305945005)(25786009)(102836004)(54906003)(97736004)(316002)(2906002)(7416002)(2501003)(2616005)(186003)(71190400001)(6506007)(386003)(256004)(476003)(68736007)(11346002)(71200400001)(6512007)(2201001)(107886003)(53936002)(446003)(50226002)(486006)(4326008)(86362001)(6436002)(478600001)(26005)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR11MB1647; H:MWHPR11MB1549.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: YEb/z9VzKiG+ejqHmETDzVmNWyQLPp/IIn0vRYDqamnNot7Q15zh/mz524ahq33Vg2B2KI+mVj3jMpvDJQXZGepJs47lU2ZpHJvNBYag6zmrUKziOlNzdEhhysoUM6WZvMYPOGSCB4ziH821UtbZ+wd1KTvb/ffypC03s0uyL952ikcs3zjP7Xfpmio5kdFIK5d6OyydLXS9foyLzmGGTiylKGLqyFt+bYzTRnBazcGV+5Gqjx9CTO633WTYrD6VXQV/fIlQAmkD2j0HjuEqSECP3Q49swe8i1/7rD48/I7DowJUZHH3eZ/jjGTFBBH081k4djMnC6eiy2OvUvTbaSjIAHNGimGAaEh8O0SEjTPxe4teN96JsnImIIf2xGg673zy8E7TMwgrMe+MEBz8eGulVEbSQxgGquLSKmbe0Ww= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 86ec419d-02b2-4943-fa98-08d6a1527909 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Mar 2019 10:08:11.3024 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1647 X-OriginatorOrg: microchip.com X-Mailman-Approved-At: Wed, 06 Mar 2019 08:09:28 +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=OJEWGUn4sN6MBIYyYCIEcvBwAOL1bwD96NFmCfT9HUZlEpCZj/hY5gvcGIi9pZNvNMD8iXwC3qu/h4ZArCS6DwE45u8NIePlvlvjKpY3iZYYOigtQD6IC08nyXlwiS2c6oQ3S3uhx8bO6QliFPx8ne3kOJ33sJlPgV5072k4ph4= 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);