Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1106168lqo; Thu, 9 May 2024 05:09:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVksmwMzo+Y/iPsxDeO0mcvZqkyeFtTZOqg6caqEfZV/zifEmmfh0Hvd1/fM0bO4SOheNh/DqL6YmgDj4yPd3A/n3Mg9D1mQO2aQTrdGA== X-Google-Smtp-Source: AGHT+IGApS2LSwTjz35KFUevuWA0OPdoaLvqA64CCSqp1UZl3439eJw8UC8kcX1TNFfowFTiy/Ft X-Received: by 2002:a05:6358:52c9:b0:192:9d35:b027 with SMTP id e5c5f4694b2df-192d2d397ffmr673091755d.15.1715256570356; Thu, 09 May 2024 05:09:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715256570; cv=pass; d=google.com; s=arc-20160816; b=onDqaHvjWqZOH7RDdFNQZWKuPKJKMLInBh0NKd16Q9GUT6ptvP3agZxi1ArEv9DQaD MEHRrZfiNNj4keAFYPD/TJjN6en7XDGG0wOYaC0UjB4U7Z/YBJeJSNqR2SrBMXLYAcyD 2bw/oiDhBafQCg4wxu1kL2RGRg0Z/EmBxEVNolvq8hEdfruuj0JWgbSOi0CQlvPwbpBh m3VHuo60Vu2aOilQXvv0QREqSg8dpLGGlbZdy4yMwor36iziFIeNECh9AqevxLbo4L1A sog1VAOv4/DL2D1/+ojvdvWU3N+wqkHQKDx51ubmcYFH7nbv06CAGsW9QWJ1pPKVyBRy r25g== 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=q+bLe4/l+mvEUfFbA3v+BR5qf/S1rNc4PFO2a3ch0KQ=; fh=WBtsNZneVMQkoBxznIB0QU16178nvcvvNfeJhhzXxs0=; b=clHm1qDh7AnTNXU22bU6RbmjcMXz8/5bqQZa0yxfYULU7el0E07EOueT3C8Fn+R5FO TqeZLdtQBDG1gqeae3L9gYdWSSF8pwzVBW/995CQ9aVKjeMiCu7XjPqazUYqTjmicExa icARsvoNTRAfrMawEok3Id73k51oTyWOTg320Vpjoa7ZcMJhE+g6GbDhj4rCk5mLIwIQ QvKXcR5nvMAWhzZD2L10LWFDNMPogyZcsUaA9lAWZ1nAypyuxPcw+V8zah0oXRKp7OAV JDane+hzrqyjurt3VugyRyZdztoYaB793hKsN0QlwFJWAWQpUsflcrkX29/4DaJ4XbP7 Ydhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bFgScjXV; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-174473-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174473-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 41be03b00d2f7-6347ec8513bsi1058461a12.648.2024.05.09.05.09.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:09:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174473-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=@gmail.com header.s=20230601 header.b=bFgScjXV; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-174473-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174473-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 29C73B22BF2 for ; Thu, 9 May 2024 12:08:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61D8C152783; Thu, 9 May 2024 12:07:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bFgScjXV" Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADC3E14C596; Thu, 9 May 2024 12:07:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715256449; cv=none; b=eOslDjA0kQR5Gh2+xKjQoPkNb8PpuY8YJNSlN9v1wdyH/6lLSI02Fo0o0SqvdLGanZ2paVLWzDOuVMAmItMOl+avCJRKFK4L4C2E4TnZEaBGDyhQ+XtFSI8wslJImYfmpXDif9o3jxuwMRXVCBA0KSOEST47Qw+1f4oCHvgLkEA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715256449; c=relaxed/simple; bh=FVF1vPUJcgITD5TmHRdOszxgJ3LOiez8Bu93Wt/3l4Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g+rttXlHMKGot8Ipf90/LN23koqtE0n49/5dCQ9qN4SmJ9uCDe9GCpYMBfEW4AQ3XwTxi1vDu80U3H9wvVapUDcgD0/+kYQ4l8SCE8Zx/05dXKZTNeQFVVQl1tCV6DZHnGGK2Q2AjoM5Jg+wi2SD1bmsFoF9s26z93tf7eLLKzk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bFgScjXV; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-41ba1ba55ffso4446815e9.1; Thu, 09 May 2024 05:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715256446; x=1715861246; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q+bLe4/l+mvEUfFbA3v+BR5qf/S1rNc4PFO2a3ch0KQ=; b=bFgScjXVta7aePnZodtBZ5bGhSmEsn4UYiY8HXIpM1wlaw6iGmgHQi7xswDo9nPZUo tgaMOSxybpWUN3EaVJZ3N2hA1sQ3j1X/UsKz/fb1GxKtYI7+o4gRyG8EEkX9uw3dnpwC gp3OcZQ8Z6BKIl2ZBksamAx8HG5y3guZkctro9maYUZAwUmTnvqFvrBommCT/YLdMqQe mbnfDF3k/Dh5QolmmTePL49Gr+HnkQUL42GhQbCMbK67mkuYc/m8SenPeaoQ3RwFWBiJ 7rvNyGfP72sxHFd0GdIr3goQQiH5cfJtEw8g1S/OvumrFuGLzRahRNsqrARSZ+IngDmy gyMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715256446; x=1715861246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q+bLe4/l+mvEUfFbA3v+BR5qf/S1rNc4PFO2a3ch0KQ=; b=gL1Bg0IUcQFqlL3mlFhgBp9ImWTb00R1RDYJvP6rb1ksdSUxMbzLs/CtqIGCYsc+oT VX/uqztq9R1O8j3kZzKM0FvzdIw5qblniwhs2Nmw4NTc/ArKPlLPXNvwHbRp72NGy4Wt josZ15jP4SvUL5mst1ZTAjFZrKGASR78XLJ5ERMzqTUvezmqQthRVtAEbwF8QMYDbVvg mSxuArzR+27XboNUPmQWkgVERoIhz+SKdBXnnTxtalwX65OMQij0AXUNg/hYUCvayTy8 JrWUV59bqDCgsnh4O7SP6KGo+aPU6QGcempkzkQl+Tk6v3sviZ0OtnmMt2usrDGHCa5O ZGHg== X-Forwarded-Encrypted: i=1; AJvYcCUGAtfcGy8Hly/20DU52N5Qde8vnKP9ngoIweXdqr6EefTTJO6Znjlj8NVA6iPA43+XvRBCZoH0qDwc3WhcVE6ikrWr8cTWTXLiNpVKUT6OOc10S+IHho0KDwuF3JnMRNWlfw4oWLJUFKe1adS2Nc+SJgpkGlEUKJClK1mT6BMbPi1HLw== X-Gm-Message-State: AOJu0YwKaJ82WegX6/lZKy63NlGUTBjTaaW2i2QZfB4AY0z/I/GT6E7F PibEx9KmLLQCQZfrfM29wlx+4L5v557uMtkMysCk8gbnHUdk09s= X-Received: by 2002:a05:600c:354a:b0:41b:f24a:b590 with SMTP id 5b1f17b1804b1-41fbc91f3e4mr21505645e9.3.1715256446176; Thu, 09 May 2024 05:07:26 -0700 (PDT) Received: from U4.lan ([2a02:810b:f40:4600:b44:d8c3:6fa8:c46f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccce1912sm24112005e9.11.2024.05.09.05.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:07:25 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Turquette , Stephen Boyd Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Alex Bee Subject: [PATCH v2 5/7] drm/rockchip: dsi: Add support for RK3128 Date: Thu, 9 May 2024 14:07:13 +0200 Message-ID: <20240509120715.86694-6-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240509120715.86694-1-knaerzche@gmail.com> References: <20240509120715.86694-1-knaerzche@gmail.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 The DesignWare MIPI DSI controller found RK3128 SoCs supports up to 4 DSI data lanes. Similar to PX30/RK356x/RV1126 it uses an external D-PHY. Signed-off-by: Alex Bee --- changes since v1: - none .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c index 6ed64cc35275..17fd5260218a 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c @@ -153,6 +153,11 @@ #define PX30_DSI_TURNDISABLE BIT(5) #define PX30_DSI_LCDC_SEL BIT(0) +#define RK3128_GRF_LVDS_CON0 0x0150 +#define RK3128_DSI_FORCETXSTOPMODE GENMASK(13, 10) +#define RK3128_DSI_FORCERXMODE BIT(9) +#define RK3128_DSI_TURNDISABLE BIT(8) + #define RK3288_GRF_SOC_CON6 0x025c #define RK3288_DSI0_LCDC_SEL BIT(6) #define RK3288_DSI1_LCDC_SEL BIT(9) @@ -1518,6 +1523,18 @@ static const struct rockchip_dw_dsi_chip_data px30_chip_data[] = { { /* sentinel */ } }; +static const struct rockchip_dw_dsi_chip_data rk3128_chip_data[] = { + { + .reg = 0x10110000, + .lanecfg1_grf_reg = RK3128_GRF_LVDS_CON0, + .lanecfg1 = HIWORD_UPDATE(0, RK3128_DSI_TURNDISABLE | + RK3128_DSI_FORCERXMODE | + RK3128_DSI_FORCETXSTOPMODE), + .max_data_lanes = 4, + }, + { /* sentinel */ } +}; + static const struct rockchip_dw_dsi_chip_data rk3288_chip_data[] = { { .reg = 0xff960000, @@ -1695,6 +1712,9 @@ static const struct of_device_id dw_mipi_dsi_rockchip_dt_ids[] = { { .compatible = "rockchip,px30-mipi-dsi", .data = &px30_chip_data, + }, { + .compatible = "rockchip,rk3128-mipi-dsi", + .data = &rk3128_chip_data, }, { .compatible = "rockchip,rk3288-mipi-dsi", .data = &rk3288_chip_data, -- 2.43.2