From patchwork Thu May 9 12:07:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13659689 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44532C10F1A for ; Thu, 9 May 2024 12:07:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9492210E298; Thu, 9 May 2024 12:07:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kWBKlAWW"; dkim-atps=neutral Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 53D3F10E110 for ; Thu, 9 May 2024 12:07:24 +0000 (UTC) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-41fd5dc0480so2781275e9.1 for ; Thu, 09 May 2024 05:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715256442; x=1715861242; darn=lists.freedesktop.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=TAif8iJN8V1k3wa8UJdZQ5GifnX9nyDTgUZq5/d7HCc=; b=kWBKlAWWs25VtzZubCPysJyZLFl67RAjjPTtDGLXF+VcKsGjgC6zLsQZ2eHAx2WzVg aJ9i4BXtCVRJuYERikTZlDKPJv1C3HBhERurQwpCk22YPUWbs4MQXfwpDMm4K7SLfVbu RYtLKeTzWHEdWqmCvBPj18bc/iW+dgBEWXSgNjIYpEj/bCGVUd64TfQ61DF5HRLzapIQ W0nLWZQuTn4Lj6aA2lezybhMvWIX0LS5xGGfkEyDUv3Zbg6wrYYp4rHV5DQH8JUmUrkQ 2irDbhm+w+LqRH0usJbAMCSEF/xBFnYoxADigHyOEUzbrSX/ZAK3ppWz7GFI4bJJwYTX bd0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715256442; x=1715861242; 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=TAif8iJN8V1k3wa8UJdZQ5GifnX9nyDTgUZq5/d7HCc=; b=Sk2Wc2JK/d6rSEQxW7yA7b/ooaJfMYp5ey3G8vBaUJU+xBDgnWbdK1Z23cIXotkcMm eryHzc9ml5m5HhyKOiBKfCwGxc+3o3qEMG5r/RjvNiqpkyS9aoceGxIcM0RYtGqGzP+x WUxHjTQdXJDfr6rvS87jDlZdzwtP0dsGAH/nT1+TIptsEOjGPydPxH2a3dKb29WMB0Jq 8l0Ng4+hVb8trpENE9k1QtQ72KjzE8M9Z8xqndQTJL1hDurczAXzERBaj39RbZFDW7PJ MLhzNxG6zFMvfsycVmXTjqA6lUhZegWpHuc/UbsdmASIMby4ZBALJGOQQI3ulJAKPV8H 44fQ== X-Gm-Message-State: AOJu0YxOzcfzU5DWKy8HCaogyGqJGzw3Ii2xVfU3gquQ8/1eWgYKGsIB 47Tiqssc3Bo57IFBZLWJtFxVsQyI8TcPl4HVGNhLpcwtRlNhKfI= X-Google-Smtp-Source: AGHT+IHTG1IHRUpJsEvbfsclIDD11n/Cn0Dv06smo6eYHnW+6ah5dzq6AfYFQdIT1VKgAJhmoFvavg== X-Received: by 2002:a05:600c:5128:b0:418:2b26:47a3 with SMTP id 5b1f17b1804b1-41f71ecb1fcmr44191365e9.32.1715256442507; Thu, 09 May 2024 05:07:22 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:07:22 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=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 1/7] dt-bindings: display: rockchip, dw-mipi-dsi: Document RK3128 DSI Date: Thu, 9 May 2024 14:07:09 +0200 Message-ID: <20240509120715.86694-2-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> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Document the MIPI DSI controller for Rockchip RK3128. The integration is very similar to PX30, but it has an additional AHB clock. Signed-off-by: Alex Bee --- changes since v1: - added ahb clock .../rockchip/rockchip,dw-mipi-dsi.yaml | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-mipi-dsi.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-mipi-dsi.yaml index ccf79e738fa1..fdd1c8ad6045 100644 --- a/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-mipi-dsi.yaml +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,dw-mipi-dsi.yaml @@ -15,6 +15,7 @@ properties: items: - enum: - rockchip,px30-mipi-dsi + - rockchip,rk3128-mipi-dsi - rockchip,rk3288-mipi-dsi - rockchip,rk3399-mipi-dsi - rockchip,rk3568-mipi-dsi @@ -36,7 +37,10 @@ properties: - const: pclk - const: phy_cfg - const: grf - - const: pclk + - minItems: 1 + items: + - const: pclk + - const: ahb rockchip,grf: $ref: /schemas/types.yaml#/definitions/phandle @@ -120,6 +124,25 @@ allOf: clock-names: minItems: 4 + - if: + properties: + compatible: + contains: + enum: + - rockchip,rk3128-mipi-dsi + + then: + properties: + clocks: + minItems: 2 + + clock-names: + minItems: 2 + + required: + - phys + - phy-names + unevaluatedProperties: false examples: From patchwork Thu May 9 12:07:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13659690 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21892C10F1A for ; Thu, 9 May 2024 12:07:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2CC410E4A0; Thu, 9 May 2024 12:07:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CNSAu6dC"; dkim-atps=neutral Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id B629110E110 for ; Thu, 9 May 2024 12:07:25 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-51f3761c96aso999150e87.3 for ; Thu, 09 May 2024 05:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715256443; x=1715861243; darn=lists.freedesktop.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=CkypWPW9zjRDxFdsbSAq2JqA2c+afHrqHIvisMDjIts=; b=CNSAu6dCdK6rs5er/r7u9nPTBz71Ot3gQy+CjbuVuy+YtcyK5IdiGo8+sH6vjmEXnd XDN2/ohLJRCXygfbTfz6JawZ/EyvVs2fQ+DB7g2OE+cWcDFwCqPUe0kawQah9Q0wmtxQ 4eHL7LhNnQK8s8/aKzzrA+EhPBUqzwlVknWu4zef595ufb4eV/2CsR6QTTPmQrE7cn97 wQmMhnPv/u2k47nZTooG7aw+fdtgeab83BglcnoXkbJLvvI0O+1zHEGRQZps2VMgNjEI te1kGGJ/ISvqID59M2m3+V34zOUU1nvNnDbUPBw0PoOJbv0RWe61Eu0t83kZTSFio6ot ggxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715256443; x=1715861243; 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=CkypWPW9zjRDxFdsbSAq2JqA2c+afHrqHIvisMDjIts=; b=qMNJ5JQzbp7/pO8RqdevCTq3I1mHjXGkDF64URTcamoZw4gCzs9Dl7hP7PjeCXniP0 wRiyNCKcFbhqqTXWEMpg/FSEeQFCFU3MkqWD+GG0z78H6/UYAKDEPI5irMmSF4t3eu9h u6eCChwqJ0/4ILejP2XcPhJ+OsrMpuC09Z2nrq22KGHmO+3oTDHzv+gGRb3dBOo59Cgw yJbDalWBNzDRKOEpQyofe2JQlvxXNyajw54mu5UyLsr5Q1LFVoAW3igrP2zduGNl7n4m RDDPi0/lz/ARDHF2wpmlLTYfsPWZcq3sCgkL0nhTjjn5jbURGLI1U5BWoZCo+t6HUoIT BkaA== X-Gm-Message-State: AOJu0YyGwFflKLP+VbuOjwtRlTy+/rT/dQrWS2Y3uasudlCzItGXJtDI rAyrf2aTBVp+WQRCkca22IQso93LPu0pZ4LbX0qe+lnLaGWPf0Q= X-Google-Smtp-Source: AGHT+IHys9c5rfgObjKdpLe0taBmnOFFOHsrH8dMTFsMSmyd7UfuBmkk0BjGCiFKBOXChJJYLuzTew== X-Received: by 2002:ac2:5388:0:b0:51a:e305:eb20 with SMTP id 2adb3069b0e04-5217c567012mr4863974e87.17.1715256443303; Thu, 09 May 2024 05:07:23 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:07:23 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=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 , Conor Dooley Subject: [PATCH v2 2/7] dt-bindings: clock: rk3128: Add PCLK_MIPIPHY Date: Thu, 9 May 2024 14:07:10 +0200 Message-ID: <20240509120715.86694-3-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> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The DPHY's APB clock is required to be exposed in order to be able to enable it and access the phy's registers. Signed-off-by: Alex Bee Acked-by: Conor Dooley --- changes since v1: - none include/dt-bindings/clock/rk3128-cru.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/clock/rk3128-cru.h b/include/dt-bindings/clock/rk3128-cru.h index 6a47825dac5d..1be455ba4985 100644 --- a/include/dt-bindings/clock/rk3128-cru.h +++ b/include/dt-bindings/clock/rk3128-cru.h @@ -116,6 +116,7 @@ #define PCLK_GMAC 367 #define PCLK_PMU_PRE 368 #define PCLK_SIM_CARD 369 +#define PCLK_MIPIPHY 370 /* hclk gates */ #define HCLK_SPDIF 440 From patchwork Thu May 9 12:07:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13659695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE71BC25B79 for ; Thu, 9 May 2024 12:07:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DA2F10E793; Thu, 9 May 2024 12:07:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="edbeEeMc"; dkim-atps=neutral Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5E2F210E298 for ; Thu, 9 May 2024 12:07:26 +0000 (UTC) Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2dfb4ea2bbfso8074621fa.2 for ; Thu, 09 May 2024 05:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715256444; x=1715861244; darn=lists.freedesktop.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=lAJ0ir3EvsiOixSkrLpbfd6IrLvM1qhtQ0lJENdLIss=; b=edbeEeMclk9FcA3/bttYrrs4nplabeq6pXkrRl55Llepy9H2LT+jC2sCGdQXWn6baI KRDukVtMjFTL+caFsdVaIdeLfGtjd+tlAQOOHTOvmTycidVrFKaDWvposaRZCr3DwBk8 bK1Te4Pmnj80CUQ7U0O+mX9S0kGYWSECnAPUVLUebsuAz27cxtY+OEi2oFlsDMMHvcSK YRXzzY7H8tjP5NQXs2zyYuy9QALYJeG9tFTN+oGHewNNqYDAwQqQtIvlMLHiRjgLztLU 4G5bapKsW7oxl8l8cjdcRCQtqPNALSIR9/+kpKsDtN0kQWldIpAOcVt4wRH6Ywq7NthV P1Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715256444; x=1715861244; 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=lAJ0ir3EvsiOixSkrLpbfd6IrLvM1qhtQ0lJENdLIss=; b=ri6VgJR/0Q7jpEztW6c/OacXlo90lCZAVh7Nu4Z9P9R0AHAqgHla6GmMwNHgnmJY0o sjsFBLsIGPljDrAgCX+FZlpLrIi0Nde3Y8XJ1x/jpXCg4jWVZ+qVkwL9AUiGjmrty6WD FHenlPpfTv5Uw7S/tLJC38n9k5A7kNDy4w5dPusPR94HnatOyokmIp/02lNEtEqb7T4T EKOJSTYQL6ubqceTw7JuBu7ouGABbBOCMMP23VS9v/YjwRXhfVBtkU9F28FDHXL7m7o7 ki2jEcYFQVn6HkozgX3kC7rbCPhU9R3eQKwcQm8qr7PuhclD+umKYoJWewCTRyOJ0LqN p/EQ== X-Gm-Message-State: AOJu0YzGkFiruKkASuGgUo1oPGXOxjsC7i0WoyykJ2sVLR6BcZh91Sf8 nMQw7ek2SchAtVBCPfjQAWiK4UcRSrqsJ+3nx587btZIp2FDqTQ= X-Google-Smtp-Source: AGHT+IFUYRwayrG45zhDJt6ESVgR9RDCoOYAoZNv9N+U2t+cQ8R6nC8DmHzJhqkPB1HbzzA7y03QZQ== X-Received: by 2002:a2e:9005:0:b0:2df:dae1:b2c0 with SMTP id 38308e7fff4ca-2e4473a9373mr34950901fa.13.1715256444099; Thu, 09 May 2024 05:07:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:07:23 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=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 3/7] clk: rockchip: rk3128: Export PCLK_MIPIPHY Date: Thu, 9 May 2024 14:07:11 +0200 Message-ID: <20240509120715.86694-4-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> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Export the D-DHY's APB clock for usage in the DT. Also drop the CLK_IGNORE_UNUSED-flag, as the clock will be enabled on demand. Signed-off-by: Alex Bee --- changes since v1: - reword commit message drivers/clk/rockchip/clk-rk3128.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/rockchip/clk-rk3128.c b/drivers/clk/rockchip/clk-rk3128.c index 75071e0cd321..a20d1fd25e2a 100644 --- a/drivers/clk/rockchip/clk-rk3128.c +++ b/drivers/clk/rockchip/clk-rk3128.c @@ -526,7 +526,7 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = { GATE(PCLK_ACODEC, "pclk_acodec", "pclk_cpu", 0, RK2928_CLKGATE_CON(5), 14, GFLAGS), GATE(0, "pclk_ddrupctl", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(5), 7, GFLAGS), GATE(0, "pclk_grf", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(5), 4, GFLAGS), - GATE(0, "pclk_mipiphy", "pclk_cpu", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(5), 0, GFLAGS), + GATE(PCLK_MIPIPHY, "pclk_mipiphy", "pclk_cpu", 0, RK2928_CLKGATE_CON(5), 0, GFLAGS), GATE(0, "pclk_pmu", "pclk_pmu_pre", 0, RK2928_CLKGATE_CON(9), 2, GFLAGS), GATE(0, "pclk_pmu_niu", "pclk_pmu_pre", CLK_IGNORE_UNUSED, RK2928_CLKGATE_CON(9), 3, GFLAGS), From patchwork Thu May 9 12:07:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13659691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 526E4C10F1A for ; Thu, 9 May 2024 12:07:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2AD2D10E4E8; Thu, 9 May 2024 12:07:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kdDrzeeg"; dkim-atps=neutral Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 440CA10E4E8 for ; Thu, 9 May 2024 12:07:27 +0000 (UTC) Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-51f1bf83f06so789684e87.1 for ; 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=1715256445; x=1715861245; darn=lists.freedesktop.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=q8klZW1X3Sda14Lq0eRI1WDVW4JJJl7xuMqHEZ5sEhE=; b=kdDrzeegXX1hXNPCx9ArV7au1O0x+mJ90MPTxK7DLVTUHZm8HJsvQP3+gIhk/O68Kq dtItGR3frHFAJhZCU7OJsdLtjBwvazo4atfqTSTV8+RSDzD88wpoWUIKrC9tVCKfZ8HK eD4HT+xY7fCbDl5kwGAbAD6SS7RaEY2HA/ij8zvfUoItDzUpohrpkPTQClf/Su9sFjmz EgAwDDu6g3/g1CEoO3IBdgoPvfIpxIQaSihdnIlhOMkGm2wWq6Xnok8oqw9QiVTbnKOw jzXY/mptrd/QKbGeVG4bfGcts1GRFZL+srLuqokbkLm/OqRZR4O2FMZ6217FRY6z6MnC P6Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715256445; x=1715861245; 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=q8klZW1X3Sda14Lq0eRI1WDVW4JJJl7xuMqHEZ5sEhE=; b=gd93iZccmlyxSRkwT/Qc9U8y+rETDp72mgnLwdkZm2pYJu9o8uyWUf76My8/W8gYJP kButjsQx38OhQzP6NbJXQI8uPluH8EYVVkRrb925o/egO/4ZiJJWiCSmEx/q/iy3UehW 6fldzjvcwW88Jn7OyTJu/XboVzLlDVaPpA11payNTw3W13/JxB5F/qrq8JGP6rCO7Zx7 H2IZP0vuv5bh/XCKBJyUrbix9hgrzqrkpm7UJIXSDjhiAGlk/4M16xaE8f495n1sUta8 E9XJRNxEDbrGExnDPp/cglHNAW7zi8OEeziIxRwQNgxliGxgpZoyUr0tPZSKr/s5p+nl UW3w== X-Gm-Message-State: AOJu0YyrvsghMCwNret8dmChKqnQIaGfwbDnxOzckIFDBcUBA13qwrAC 7+HnUDNejef9nPrf0g+9ga6+EINcbDzUOdJ49QFIFB+5Snj6p2o= X-Google-Smtp-Source: AGHT+IFecuxCJWM/nUWDhGJ7gBSfItZDqcg8FMCaOxeHy6FMY+wOyJdPzB48iweW2PiFVOX6Z6J58A== X-Received: by 2002:a05:6512:210a:b0:51d:9921:20f7 with SMTP id 2adb3069b0e04-5217c56f496mr3116279e87.40.1715256445211; Thu, 09 May 2024 05:07:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:07:24 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=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 4/7] drm/rockchip: dsi: Support optional AHB clock Date: Thu, 9 May 2024 14:07:12 +0200 Message-ID: <20240509120715.86694-5-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> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Some integrations of the IP additionally have an AHB clock which has to be enabled before accessing the registers is possible. Add support for it as an optional clock. Signed-off-by: Alex Bee --- changes since v1: - new patch .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c index 4cc8ed8f4fbd..6ed64cc35275 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c @@ -265,6 +265,7 @@ struct dw_mipi_dsi_rockchip { struct clk *pllref_clk; struct clk *grf_clk; struct clk *phy_cfg_clk; + struct clk *ahb_clk; /* dual-channel */ bool is_slave; @@ -1153,7 +1154,15 @@ static int dw_mipi_dsi_dphy_init(struct phy *phy) goto err_init; } + ret = clk_prepare_enable(dsi->ahb_clk); + if (ret) { + clk_disable_unprepare(dsi->grf_clk); + clk_disable_unprepare(dsi->pclk); + goto err_init; + } + ret = dsi->cdata->dphy_rx_init(phy); + clk_disable_unprepare(dsi->ahb_clk); clk_disable_unprepare(dsi->grf_clk); clk_disable_unprepare(dsi->pclk); if (ret < 0) @@ -1240,6 +1249,12 @@ static int dw_mipi_dsi_dphy_power_on(struct phy *phy) goto err_phy_cfg_clk; } + ret = clk_prepare_enable(dsi->ahb_clk); + if (ret) { + DRM_DEV_ERROR(dsi->dev, "Failed to enable ahb_clk: %d\n", ret); + goto err_ahb_clk; + } + /* do soc-variant specific init */ if (dsi->cdata->dphy_rx_power_on) { ret = dsi->cdata->dphy_rx_power_on(phy); @@ -1269,6 +1284,8 @@ static int dw_mipi_dsi_dphy_power_on(struct phy *phy) return ret; err_pwr_on: + clk_disable_unprepare(dsi->ahb_clk); +err_ahb_clk: clk_disable_unprepare(dsi->phy_cfg_clk); err_phy_cfg_clk: clk_disable_unprepare(dsi->grf_clk); @@ -1296,6 +1313,7 @@ static int dw_mipi_dsi_dphy_power_off(struct phy *phy) DRM_DEV_ERROR(dsi->dev, "hardware-specific phy shutdown failed: %d\n", ret); } + clk_disable_unprepare(dsi->ahb_clk); clk_disable_unprepare(dsi->grf_clk); clk_disable_unprepare(dsi->pclk); @@ -1429,6 +1447,13 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev) } } + dsi->ahb_clk = devm_clk_get_optional(dev, "ahb"); + if (IS_ERR(dsi->ahb_clk)) { + ret = PTR_ERR(dsi->ahb_clk); + DRM_DEV_ERROR(dev, "Unable to get ahb_clk: %d\n", ret); + return ret; + } + dsi->grf_regmap = syscon_regmap_lookup_by_phandle(np, "rockchip,grf"); if (IS_ERR(dsi->grf_regmap)) { DRM_DEV_ERROR(dev, "Unable to get rockchip,grf\n"); From patchwork Thu May 9 12:07:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13659692 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8848DC25B10 for ; Thu, 9 May 2024 12:07:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 30E4710E5A4; Thu, 9 May 2024 12:07:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HIgSwBEH"; dkim-atps=neutral Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id E978610E4E8 for ; Thu, 9 May 2024 12:07:27 +0000 (UTC) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-41ebcf01013so4551785e9.0 for ; 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=lists.freedesktop.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=HIgSwBEHHFNoSMSnyZUoS8+VZzZK1m6vpZ14+63W2NnlowYC9WAFFni44WUFZ8a8dD SiEwE9CzkfStedgJg41T2yDqzzGExhSS6qCurflel3zvCRGwrJEWARwaJ9c06jhAEMxi UzLKQBtnQHJBzHO72BeOhN9pbp6c7np/dsmqJxvB5qOHbk6xIQr5Pgke/PiRU9ECLk81 wiViP1B/2K9VvxmrnoEN8unLKMD+LEdoIsOkworEWREu3ls1YWUA7vrxED4PMu5kObUW oQFZgQJ3H9ZCTksuxoinakqvBfg5k+ql5oDqXJ6XM+nm5xSaqIbufmyFAs6ajQJ3yA49 VRyg== 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=EPS63GHjXugaGpkx4pWd1QDVPa0uugddHlnu2H7mKD8IiOShPx1IJVBSfByFo/OsV5 7YvjHqzqbjqw+9dWeID79EBk1/jnCCwTksKPRo+/z0lHCPWjmQuicQBMuOKMXPKM9OUb FERxpPgaxhRWB66a/G0sRyKKvw5+/Gq56pzSO906ysCZZl8QGcVEiM/7wOyvHCN80MQW ZgshYOa5FYOlZiro81kJbEg7gFSKJkFUSIhd8/ddRuBzV3b+CGwqm1ex0sVjpEhvq8GK bHniL8Ov2IGw2SDo+h77sQThFGhpSOcNGw2Fls5cv1dCnRt00vRfk9Jmo4U30bBDTxqs dw0g== X-Gm-Message-State: AOJu0YyMr3Z6F1XCYU27ww3oiOxc2/38qv7MDNW4soo3j5REkm0qMtK+ Qbs2IUbjCd9JntzIKpC3ufd/cgh93NCEkDIJ6JYB6sNnvMz9wCPom765 X-Google-Smtp-Source: AGHT+IHtoArrqD0dnvqLAhLONFA8xc0foDIiP2c2dDm/g4xMVPSUsPLYrXXxqeAb6C9ioPtRQlXv6w== 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_St=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> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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, From patchwork Thu May 9 12:07:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13659693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 024B9C25B77 for ; Thu, 9 May 2024 12:07:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B7B110E661; Thu, 9 May 2024 12:07:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ZL7+LwIH"; dkim-atps=neutral Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id DBD6910E4E8 for ; Thu, 9 May 2024 12:07:28 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2e0b2ddc5d1so9194801fa.3 for ; Thu, 09 May 2024 05:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715256447; x=1715861247; darn=lists.freedesktop.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=BojjtcE4PW8Jg2RRLDbuh20R8FtUvCT6KeHyvo0GHNo=; b=ZL7+LwIHXkco5MemxCslIZ6NeIkTDutEoHIvB/sV3ujJOUfkQ9sK4JPpyDeZAV1jfq 2Edrl5uCTzwrpY+i8bcNZx6Y87iiJS3ACiZ0Ed2j8BGLcEjedm1dgMQuiDNkT0JUuQx+ 2gZFf8DZ3/xDlqAPKSCqWroqMh1Svws9ZUFTP7dh1Sm4Qii+UN9Rbk+rhHnJzwYNJ3Gc IXtrIP7xGdPSWABUVLgQJC483I554RpKDlRaoyNdOR1GjxUIxmRjOjWzrbU/5hIIOgpq swGuUtRlWsh409fPlu44YB49QdhAaShMs3mZ3HGlTVdbwXbC+dqSGUoo/gSXmFxhsKfh G4tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715256447; x=1715861247; 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=BojjtcE4PW8Jg2RRLDbuh20R8FtUvCT6KeHyvo0GHNo=; b=iMMMc1taMQFNUsBf8ijwzjqHxXZsWVpDi9rRaFPJT/edz49BVSsamsm8tpoqbk6L1u s0blOAZA21R2jtPetDRRlP5No0ufUeApCfdMN20n+ro8poNUuVFxeTuYx3kqm8wlvOGD Zo9w3QKtyH4AM/wc76xZr65ev2PcTXO4dJP0cUkRJUOg+gy9hbZLO91M+rzvtR1gIFWL fNvV42C6VOJGQRnklXcTdjKgN6/+xAf8h3VgLiBS/f6YZNY4EiopIHoozpi0M15utVIH 1+Q3MBxdZRU9lbriQt+dHtSyrwdt4MQ2mxVEToDZr54LP2OuVyCc3AoCR1FYVLtCB05i uqtQ== X-Gm-Message-State: AOJu0YzatoysWlfbmGTTFrsr4k0R8fHdxA4PrGnnt3+tdK0uDzcQU3R/ YRtH60vjQCC3vcRHTSjJE6Zw7c6a6IAZUcqYP0WJomqBH9qYpY+pnww1 X-Google-Smtp-Source: AGHT+IE4TX6luDFQmraVbsCSCIhJfzYELnpsZujXaSoQ8waQa95ruXUBJvJ/gqlTIZi6yx2evpmhPA== X-Received: by 2002:a2e:9983:0:b0:2df:c0c7:9046 with SMTP id 38308e7fff4ca-2e4479ba923mr37325681fa.35.1715256446939; 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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:07:26 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=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 6/7] ARM: dts: rockchip: Add D-PHY for RK3128 Date: Thu, 9 May 2024 14:07:14 +0200 Message-ID: <20240509120715.86694-7-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> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The InnoSilicon D-PHY found in RK3128 SoCs supports DSI/LVDS/TTL with a maximum transfer rate of 1 Gbps per lane. While adding it, also add it's clocks to RK3128_PD_VIO powerdomain as the phy is part of it. Signed-off-by: Alex Bee --- changes since v1: - also added SCLK_MIPI_24M to powerdomain - reword commit message arch/arm/boot/dts/rockchip/rk3128.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi index fb98873fd94e..fbd95bb08cd3 100644 --- a/arch/arm/boot/dts/rockchip/rk3128.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi @@ -216,6 +216,8 @@ power-domain@RK3128_PD_VIO { <&cru ACLK_LCDC0>, <&cru HCLK_LCDC0>, <&cru PCLK_MIPI>, + <&cru PCLK_MIPIPHY>, + <&cru SCLK_MIPI_24M>, <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru ACLK_VIO0>, @@ -496,6 +498,18 @@ hdmi_out: port@1 { }; }; + dphy: phy@20038000 { + compatible = "rockchip,rk3128-dsi-dphy"; + reg = <0x20038000 0x4000>; + clocks = <&cru SCLK_MIPI_24M>, <&cru PCLK_MIPIPHY>; + clock-names = "ref", "pclk"; + resets = <&cru SRST_MIPIPHY_P>; + reset-names = "apb"; + power-domains = <&power RK3128_PD_VIO>; + #phy-cells = <0>; + status = "disabled"; + }; + timer0: timer@20044000 { compatible = "rockchip,rk3128-timer", "rockchip,rk3288-timer"; reg = <0x20044000 0x20>; From patchwork Thu May 9 12:07:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13659694 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82E5FC25B10 for ; Thu, 9 May 2024 12:07:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A3CD10E74A; Thu, 9 May 2024 12:07:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SCv6s3DD"; dkim-atps=neutral Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by gabe.freedesktop.org (Postfix) with ESMTPS id C282010E4E8 for ; Thu, 9 May 2024 12:07:29 +0000 (UTC) Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2e0933d3b5fso9779781fa.2 for ; Thu, 09 May 2024 05:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715256448; x=1715861248; darn=lists.freedesktop.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=UJEaWHpHfTjOx8txJp83KCReKfr+CJyqA30JyxkgRQs=; b=SCv6s3DDVb5ZbuYeNaiWtWeWDYO9RRIT+rQdy4sXge2DP1VtauCoNzxNFaNSciehXw VYUmgEdHA9AnCYWNCMbAX9fG0JYTPQ1GNyi766gFV5Pnwg7QKaWZmNiQRXInPkx3oxZ0 Lc17wyWrUJ0dVYX0/rDF4NwKeh0BX9+O8B8WKE5LByctGMfD0AX5+VCo+GtJUvl9OF2l g1vi+wrDz/HUffBcjQ3Bvl1S80Qb1GbsdonkQ+M2w10a+BcyIPUdlH6FaCS9OKk59GPK 4xWa6h1GZ/18xIrl8Ddc7IgmAZLumVoub8Y4Ujk+JYzdWZN6we2G7An5VbwoXF8TFFr/ n4MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715256448; x=1715861248; 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=UJEaWHpHfTjOx8txJp83KCReKfr+CJyqA30JyxkgRQs=; b=JTKbqFk20IJaAhBGLLWgC6e59n3JpjlJ8U9e+Kfvs6LrvP/alyknm/s01fWVNgZhYM gjv+byAEDtiuaK0PsteJZoyohwF155qxO/xOZdKJqBjQIq4HkMUx44i06m5VqsMDLQqv g05Myf6vzpsnZZwTNfT+dWe5glgO9HtaypACNx/rtS/mdJgUWAEvYBa1nAvHbUUbOH6x WnKUGgpAUqdeumOe65RkuRkOpCrN/J6AJqiGVtdQ5Db9F/t6VdPGS16Aq/+PQ4DzTHmG He3NrQ4wfAnyuSl8a8pO8M2rg5lhhEkRu5wxczkfaIN8PLgbYZhWtQWJKj7HsXqAcksl H/hw== X-Gm-Message-State: AOJu0YwlYrFlCUI6uNfg8TGYdXQrqh5bRPdbFEsoCSAMx9TESHvR3O5Z 9yczCeynmJPloNPewkRd1iwRov8JofyBanNP31KT7t+o3Md+8uI= X-Google-Smtp-Source: AGHT+IEOGVpnlxc4D9Jfg4bzT5yUTxC5Nb1l7o9iKNsaxhKiAZ+w5GYZsS4D630ujkwBJ9hHrRUsqA== X-Received: by 2002:a2e:4602:0:b0:2e0:3132:94d4 with SMTP id 38308e7fff4ca-2e446f7c72amr28137541fa.16.1715256447777; Thu, 09 May 2024 05:07:27 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:07:27 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=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 7/7] ARM: dts: rockchip: Add DSI for RK3128 Date: Thu, 9 May 2024 14:07:15 +0200 Message-ID: <20240509120715.86694-8-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> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add the Designware MIPI DSI controller and it's port nodes. Signed-off-by: Alex Bee --- changes since v1: - added HCLK_VIO_H2P as ahb clock arch/arm/boot/dts/rockchip/rk3128.dtsi | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi index fbd95bb08cd3..1ed4436549ee 100644 --- a/arch/arm/boot/dts/rockchip/rk3128.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi @@ -277,6 +277,42 @@ vop_out_hdmi: endpoint@0 { reg = <0>; remote-endpoint = <&hdmi_in_vop>; }; + + vop_out_dsi: endpoint@1 { + reg = <1>; + remote-endpoint = <&dsi_in_vop>; + }; + }; + }; + + dsi: dsi@10110000 { + compatible = "rockchip,rk3128-mipi-dsi", "snps,dw-mipi-dsi"; + reg = <0x10110000 0x4000>; + interrupts = ; + clocks = <&cru PCLK_MIPI>, <&cru HCLK_VIO_H2P>; + clock-names = "pclk", "ahb"; + phys = <&dphy>; + phy-names = "dphy"; + resets = <&cru SRST_VIO_MIPI_DSI>; + reset-names = "apb"; + rockchip,grf = <&grf>; + power-domains = <&power RK3128_PD_VIO>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + dsi_in: port@0 { + reg = <0>; + dsi_in_vop: endpoint { + remote-endpoint = <&vop_out_dsi>; + }; + }; + + dsi_out: port@1 { + reg = <1>; + }; }; };