Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1707390ybx; Thu, 7 Nov 2019 16:05:30 -0800 (PST) X-Google-Smtp-Source: APXvYqz4NH3psJ5cxrLF2fk1W5gaTwv73rdCBn28xPIwL88Pyxb+b/MOSIQFQm4CCtNJpW4r82yZ X-Received: by 2002:a17:906:1fcf:: with SMTP id e15mr5688062ejt.317.1573171530885; Thu, 07 Nov 2019 16:05:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573171530; cv=none; d=google.com; s=arc-20160816; b=qHKhQGgffNmkiCnJnH4sgQKYvVLmDJUU8YgUl7nAwz8Dw0C+RFmrh5hsal3yN8hd0S JZmk2yUEBt/GgEb+7/XhmY2tousAG5ErSbas/TfWegoQeJAFEcW03gbhg9dXbc2DXugX iTzNOLDCk+llF/Uei9r/C/sOM9qx8CciGFF5ctahhj8mCbgq/XtsMIPqQmMnOMnsCXCd FDl1hvwYmJKNOOPQjnmWfwX1Lo4q9iGPK2ELjnLEVum5EjySv1BmS8f5McmSO/eFi/qX tBwmzSb6peUjgDfWPPNUBCqrSnDTpEDEFfoujk7SDJ1zr2wFVTPOPtVZLYf4yHXvSzXe qghg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LJRk4KkWg6LIR+VvTzeLZKQ1tzLeigI9I6yzMRKqVbA=; b=kW13hEwIuhwxQhs2vo4Gcb2HWJun5/ri9NSch861QDYSKfFp2Hqy+CbuOWo35DhyKq LNTH9phBGgyAMdynjinV+EzUuriIeaBfP0hCNQDYXOMRdnsDMROHebjmTXzyxbLu5Vq4 siSTu1IGt9T1E0VeDdUIrgFvFJzUYocTss2moEjp8uxWuex8TbLLV+LVkiy2AvFXRWbP Ni7y82mWTcgn8iQYaDTVsAPgnyI9acFBTGlwWUkkHSxv7ygdE3wo4ahNhjwTQcBv739S Z9tO71myCpX8/T39d6awJcvksXbcCr5QS0twFLgfXEKMsOCWbM2dx4orTaFUd32Bovv/ PfgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w54si2694982eda.214.2019.11.07.16.05.08; Thu, 07 Nov 2019 16:05:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728265AbfKHADc (ORCPT + 99 others); Thu, 7 Nov 2019 19:03:32 -0500 Received: from gloria.sntech.de ([185.11.138.130]:49640 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbfKHADR (ORCPT ); Thu, 7 Nov 2019 19:03:17 -0500 Received: from ip5f5a6266.dynamic.kabel-deutschland.de ([95.90.98.102] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iSrk2-00065H-PI; Fri, 08 Nov 2019 01:03:06 +0100 From: Heiko Stuebner To: dri-devel@lists.freedesktop.org, a.hajda@samsung.com Cc: hjc@rock-chips.com, robh+dt@kernel.org, mark.rutland@arm.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@siol.net, philippe.cornu@st.com, yannick.fertre@st.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, heiko@sntech.de, christoph.muellner@theobroma-systems.com, Heiko Stuebner Subject: [PATCH v2 5/5] drm/rockchip: dsi: add px30 support Date: Fri, 8 Nov 2019 01:02:53 +0100 Message-Id: <20191108000253.8560-6-heiko.stuebner@theobroma-systems.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108000253.8560-1-heiko.stuebner@theobroma-systems.com> References: <20191108000253.8560-1-heiko.stuebner@theobroma-systems.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the compatible and GRF definitions for the PX30 soc. Signed-off-by: Heiko Stuebner --- .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c index 1e6578f911a0..13858f377a0c 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c @@ -140,6 +140,12 @@ #define DW_MIPI_NEEDS_PHY_CFG_CLK BIT(0) #define DW_MIPI_NEEDS_GRF_CLK BIT(1) +#define PX30_GRF_PD_VO_CON1 0x0438 +#define PX30_DSI_FORCETXSTOPMODE (0xf << 7) +#define PX30_DSI_FORCERXMODE BIT(6) +#define PX30_DSI_TURNDISABLE BIT(5) +#define PX30_DSI_LCDC_SEL BIT(0) + #define RK3288_GRF_SOC_CON6 0x025c #define RK3288_DSI0_LCDC_SEL BIT(6) #define RK3288_DSI1_LCDC_SEL BIT(9) @@ -1049,6 +1055,24 @@ static int dw_mipi_dsi_rockchip_remove(struct platform_device *pdev) return 0; } +static const struct rockchip_dw_dsi_chip_data px30_chip_data[] = { + { + .reg = 0xff450000, + .lcdsel_grf_reg = PX30_GRF_PD_VO_CON1, + .lcdsel_big = HIWORD_UPDATE(0, PX30_DSI_LCDC_SEL), + .lcdsel_lit = HIWORD_UPDATE(PX30_DSI_LCDC_SEL, + PX30_DSI_LCDC_SEL), + + .lanecfg1_grf_reg = PX30_GRF_PD_VO_CON1, + .lanecfg1 = HIWORD_UPDATE(0, PX30_DSI_TURNDISABLE | + PX30_DSI_FORCERXMODE | + PX30_DSI_FORCETXSTOPMODE), + + .max_data_lanes = 4, + }, + { /* sentinel */ } +}; + static const struct rockchip_dw_dsi_chip_data rk3288_chip_data[] = { { .reg = 0xff960000, @@ -1117,6 +1141,9 @@ static const struct rockchip_dw_dsi_chip_data rk3399_chip_data[] = { static const struct of_device_id dw_mipi_dsi_rockchip_dt_ids[] = { { + .compatible = "rockchip,px30-mipi-dsi", + .data = &px30_chip_data, + }, { .compatible = "rockchip,rk3288-mipi-dsi", .data = &rk3288_chip_data, }, { -- 2.23.0