From patchwork Wed Oct 18 16:18:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13427379 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 52994CDB47E for ; Wed, 18 Oct 2023 16:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DX6nSeu6UILrpU7CAPJ2Ps5Gv1JVQvxHkED9+WasRhQ=; b=SqzAYZFcbbq1rK CZTU+mGghR4iNoI1CRohmciGjgSU699m3vjLIXQHXNwP0VT0ws4jYziZiPwJWjkD4jNM2pGtauEKB eHz7GDGc99nwrTBRXD5KkZZKqSjhDFunJJbGLD0oz78KKDpA28UYnfER++PC7ik8E4BoDmjQLunHH R+pztTx+5muVe/dlBE5UMZ5bRmS5TPt5AX/WFnis1gq1qtKNtJnrb6psoGdR2AMAu9/pvXPqx5K1Y JxuDOnWoxyQTU3zi2dCfIqSP2+4ne1ZijNAZEQXHncwxOaDeIUuJBXuSOrP02DgMPLRcxE2E1Dpmf NAgReEbw5LSN8IYffrVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt9G9-00FAC7-3D; Wed, 18 Oct 2023 16:19:02 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt9G7-00FA9G-2d for linux-rockchip@lists.infradead.org; Wed, 18 Oct 2023 16:19:01 +0000 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3b2ea7cca04so458830b6e.2 for ; Wed, 18 Oct 2023 09:18:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697645935; x=1698250735; darn=lists.infradead.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=uw/QwKMXqJsA0ZfWa9ge2ddn0yKUbipF+wTdf3W2lOs=; b=dYSnbiMqaRTFYmR6ZA25EMMELNx+Xqzy0kfMwKheWBs8eZaW4y9dYub7L415rCUWt3 WgKdv3xEG0+6A7JE9J5yDP/5eyyOrqk6KRAtivqoDHQsWPkTF/SyyTix7JvQnReyM7Zj rhWGcAwr/iGLDO3utFx1BpUKs6QuGjA6xZHY81+TqjzW2sDEENsc2TkJv5LqoAx0c+2q RyGasWk5F8duzKwKBpZT4uh29CoWqTVgnn9SA/rw5x+eL1wE1x3Q5i9brKV4EqwAaJgl LD5oELK/F7zgQTNjsn53ijxlIjL4zqMEAJSU0qz6r4o0DkaO5mLjtX+cG6z5vbx9suNh pKcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697645935; x=1698250735; 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=uw/QwKMXqJsA0ZfWa9ge2ddn0yKUbipF+wTdf3W2lOs=; b=An60VU5sB7xWm4CTeRYGGcNS1GXGermGmtu4WLdVJroxDqJzNJaKcOglHpcn//IcK4 13jLcolOHQgKg2fssX/Q05Vt0n7aOxH0YJB8CyFA0s8EKFFUdxEDua4FtYfEvSzORM+8 kIGI7EmY+BbMBVq2Bi+4KFxYFV+fGyon7JVpcbJME1pYtPID17NBMGayo4atrmmNb5pp e+67hvZLP5Glob6y54p1INqdglkonKibcPPr9QKm65Ly1GHddC70lKK5AwBquN6sUbE8 y5bkgHYw2KfrNw7xbGDqc0QRE5g9eyWp8zrda5bu6fI+QqlMfAID/4GXfFp+kIxxslZY 2HQw== X-Gm-Message-State: AOJu0YxkdSHyjwMjShvCmnpQVDP1Sj+FwEUdyrLFNlQ5B6TiFi9qZs9M +jxVaJiUiAqcaOHwfsXl7UqONU5SPFM= X-Google-Smtp-Source: AGHT+IGVxblw+gFyde5QrjeYaigc+JDYVf1IHKc5ZSKgn/8HMCQzxvwUYh6/y+BU9OoipN7Tggfmsg== X-Received: by 2002:a05:6808:2197:b0:3a8:6b4d:6b78 with SMTP id be23-20020a056808219700b003a86b4d6b78mr6659182oib.35.1697645935531; Wed, 18 Oct 2023 09:18:55 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id db14-20020a056808408e00b003afe584ed4fsm697390oib.42.2023.10.18.09.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:18:55 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, sboyd@kernel.org, mturquette@baylibre.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 1/5] dt-bindings: display: panel: Update NewVision NV3051D compatibles Date: Wed, 18 Oct 2023 11:18:44 -0500 Message-Id: <20231018161848.346947-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018161848.346947-1-macroalpha82@gmail.com> References: <20231018161848.346947-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_091859_853855_A9E11719 X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan Update the NewVision NV3051D compatible strings by adding a new panel, the powkiddy,rk2023-panel, and removing another entry, the anbernic,rg353v-panel. The rg353v-panel is exactly identical to the rg353p-panel and is not currently in use by any existing device tree. The rk2023-panel is similar to the rg353p-panel but has slightly different timings. Signed-off-by: Chris Morgan --- .../devicetree/bindings/display/panel/newvision,nv3051d.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml b/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml index cce775a87f87..7a634fbc465e 100644 --- a/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml +++ b/Documentation/devicetree/bindings/display/panel/newvision,nv3051d.yaml @@ -21,7 +21,7 @@ properties: - enum: - anbernic,rg351v-panel - anbernic,rg353p-panel - - anbernic,rg353v-panel + - powkiddy,rk2023-panel - const: newvision,nv3051d reg: true From patchwork Wed Oct 18 16:18:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13427378 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 66708CDB482 for ; Wed, 18 Oct 2023 16:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JXl9VnmtEMJaJmRhxm62NMiYY8f28ScGiVayzdseaSQ=; b=Y3OnQvPk7mMxlA nOjz2BcgSK5eJx3I9O/lBgJ8IzhWfvrUSfOVVR41xlRsyLWTl1SQZMk/d2oq9jhoUNzuJODc2PjMa eeCmyMY7z2BVps/ssdRSPpUrEyCSdxIQWzHQOKcaFeiF2zGxag+MOpfQ6RY8iqr2I9/SXFUWckT4Y eG7BCL7OLQmYaVkNiphQlw3sJOga+vqEWts0Q5sAqWXuqeVDN75nKE9wOTP3dig/dQv44oK1K8aFa /CuW17jB9nEaY730A2b2uHZarxz9V2XGhadMwNQTy6csasgI0gfAraFz7KPGrX1HCAPuCzPx77SGv IPpLjR4s0BTQApD8jE4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt9GD-00FAE1-1X; Wed, 18 Oct 2023 16:19:05 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt9G8-00FA9I-1P for linux-rockchip@lists.infradead.org; Wed, 18 Oct 2023 16:19:02 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3ae5a014d78so4131998b6e.1 for ; Wed, 18 Oct 2023 09:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697645936; x=1698250736; darn=lists.infradead.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=T5RlhUqBqM3g+4MPGnE7ouhmH0KrUx/6TtzKaaWSu60=; b=FU7K7/aZrCiRVNJuTU7uu8ttwa7a7lPHK93gVzoC6X7TPcA7A+5W8rcWp5/RRSUH+v HvArTBHVQ2Qc840+bOuomg8VQhBnkber+AAqKu6SRAsi1U5wqJAniKWcd9hHAV+smt8k Os7SotNu0UpH45UKp0f2vXyrpiVj+wtaSobCTw0ZhTOHKQo2e+1oA5Q7qrgMSC5IeeD+ zIOQKhdPDWm2ZVpINEn15qDXRy4Z3TlkxMDmqbcFXqd703zOnTcjZQcQyJRJ+mUFr6oi fn6kXm2qBTM3BsCjviTFDbEfvW71MVZcURELCeRfzkIJDAcRtiDb7MQNPRlElUTO7Yn3 cTJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697645936; x=1698250736; 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=T5RlhUqBqM3g+4MPGnE7ouhmH0KrUx/6TtzKaaWSu60=; b=D91kjrPUCT5kZ53evTO9cDJouItLSDr0C284/PquXTm05YqbA68G6FPzBzf5HvtZ7D INSo6nEmwrdECss2l1YuErhW0OIFe/QmXGPQtESLRpsNsNVfjUSdyOy88Z80LmUl7Ok8 Ipj0dzLXcYsn/tgBU18Fte2IZIJSwR2j2oSi3BVKKLorVnhu5gj0rnebiImE+L3bw51H flhM0RoKu1HMp1byCJQAu0krolv+GG3/g7RVG2xNcKC3k9y9QULIK42ynkVSmHEkRgng cusRqJZyiKaf2LeMnPlH1vtSGZlLh4ZmyTf2LDaNbxS92wGW0pSBEfAHQwIUVabG17ZX yDIg== X-Gm-Message-State: AOJu0Yy70U88ihapH85mJl0Ah0vSI4RWdSvfvqcK7n+DcacsLeFfBbWf Z1Y2SxZvEYmdI8h5Vc5FPkNSKJ5qm44= X-Google-Smtp-Source: AGHT+IEYc+5ohz4jYnwR7FiV33p5sIPOaesEd2oV9q3jHLHsmLR4rbrebzo3oxbolWRtBOaueSf98A== X-Received: by 2002:a05:6808:2020:b0:3b2:e4b7:2af2 with SMTP id q32-20020a056808202000b003b2e4b72af2mr1658264oiw.6.1697645936268; Wed, 18 Oct 2023 09:18:56 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id db14-20020a056808408e00b003afe584ed4fsm697390oib.42.2023.10.18.09.18.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:18:55 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, sboyd@kernel.org, mturquette@baylibre.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 2/5] drm/panel: nv3051d: Add Powkiddy RK2023 Panel Support Date: Wed, 18 Oct 2023 11:18:45 -0500 Message-Id: <20231018161848.346947-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018161848.346947-1-macroalpha82@gmail.com> References: <20231018161848.346947-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_091900_475654_23433250 X-CRM114-Status: GOOD ( 16.22 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan Refactor the driver to add support for the powkiddy,rk2023-panel panel. This panel is extremely similar to the rg353p-panel but requires a smaller vertical back porch and isn't as tolerant of higher speeds. Tested on my RG351V, RG353P, RG353V, and RK2023. Signed-off-by: Chris Morgan --- .../gpu/drm/panel/panel-newvision-nv3051d.c | 56 +++++++++++++++---- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c index 79de6c886292..d24c51503d68 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c @@ -28,6 +28,7 @@ struct nv3051d_panel_info { unsigned int num_modes; u16 width_mm, height_mm; u32 bus_flags; + u32 mode_flags; }; struct panel_nv3051d { @@ -385,15 +386,7 @@ static int panel_nv3051d_probe(struct mipi_dsi_device *dsi) dsi->lanes = 4; dsi->format = MIPI_DSI_FMT_RGB888; - dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | - MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET; - - /* - * The panel in the RG351V is identical to the 353P, except it - * requires MIPI_DSI_CLOCK_NON_CONTINUOUS to operate correctly. - */ - if (of_device_is_compatible(dev->of_node, "anbernic,rg351v-panel")) - dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS; + dsi->mode_flags = ctx->panel_info->mode_flags; drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs, DRM_MODE_CONNECTOR_DSI); @@ -481,18 +474,59 @@ static const struct drm_display_mode nv3051d_rgxx3_modes[] = { }, }; -static const struct nv3051d_panel_info nv3051d_rgxx3_info = { +static const struct drm_display_mode nv3051d_rk2023_modes[] = { + { + .hdisplay = 640, + .hsync_start = 640 + 40, + .hsync_end = 640 + 40 + 2, + .htotal = 640 + 40 + 2 + 80, + .vdisplay = 480, + .vsync_start = 480 + 18, + .vsync_end = 480 + 18 + 2, + .vtotal = 480 + 18 + 2 + 4, + .clock = 24150, + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, + }, +}; + +static const struct nv3051d_panel_info nv3051d_rg351v_info = { .display_modes = nv3051d_rgxx3_modes, .num_modes = ARRAY_SIZE(nv3051d_rgxx3_modes), .width_mm = 70, .height_mm = 57, .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET | + MIPI_DSI_CLOCK_NON_CONTINUOUS, +}; + +static const struct nv3051d_panel_info nv3051d_rg353p_info = { + .display_modes = nv3051d_rgxx3_modes, + .num_modes = ARRAY_SIZE(nv3051d_rgxx3_modes), + .width_mm = 70, + .height_mm = 57, + .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET, +}; + +static const struct nv3051d_panel_info nv3051d_rk2023_info = { + .display_modes = nv3051d_rk2023_modes, + .num_modes = ARRAY_SIZE(nv3051d_rk2023_modes), + .width_mm = 70, + .height_mm = 57, + .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET, }; static const struct of_device_id newvision_nv3051d_of_match[] = { - { .compatible = "newvision,nv3051d", .data = &nv3051d_rgxx3_info }, + { .compatible = "anbernic,rg351v-panel", .data = &nv3051d_rg351v_info }, + { .compatible = "anbernic,rg353p-panel", .data = &nv3051d_rg353p_info }, + { .compatible = "powkiddy,rk2023-panel", .data = &nv3051d_rk2023_info }, { /* sentinel */ } }; + MODULE_DEVICE_TABLE(of, newvision_nv3051d_of_match); static struct mipi_dsi_driver newvision_nv3051d_driver = { From patchwork Wed Oct 18 16:18:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13427381 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 49B0FCDB483 for ; Wed, 18 Oct 2023 16:19:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7KCz4ssT8Y+BRpW87rZfWrNVtz+JmkwPGZSUQaH4qyY=; b=y14zb/yilcJW0+ oKqLZG3gR9bWRsr2Iqex/YETK4kAXerlQmsUrdOQlFUeE+j7oaZV3yE1itHksmBFC6l7XWgyp88ST iGHDgDWlqBNo0fQroW1l0jtppPhepidq44rtKfnqdyuem7tL2GuYZ8wfS23h3V9GV4bh2DCIoqX6U GZbkFn1mix17LPQo1Pp8jPreGE8kGRNjZQtFiDPzv68s3NvRlvuBi8T/QFg8M3nqAAtzRYhdybQLC v8NgEoVrqUoernbx0s1Q3XVW3oP3dDViUF1IA4GDkZLro3SNI3N//r3qZTOGy5tC8xX1Ykh0nDHzJ EbLqXjP0Zmqvou3yA9uA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt9GE-00FAFC-1a; Wed, 18 Oct 2023 16:19:06 +0000 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt9G8-00FA9h-30 for linux-rockchip@lists.infradead.org; Wed, 18 Oct 2023 16:19:03 +0000 Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-3b2d9ac9926so1127553b6e.2 for ; Wed, 18 Oct 2023 09:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697645937; x=1698250737; darn=lists.infradead.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=VJC+C4OtuULaekIgETfG9hZQeFdTuWayXpQ5YRaiN4w=; b=Jb+qze3LZgqOU2+9Sa9u0/15vHDTH5H9avD5GGnTT8Ukm/w+5BSLK02+L6NyX1nyJZ b8Yr4aAViDe+a9fQVIMIW6dioJI1R8Dce+6tJbadKAaZ9vyUPh6rc2TTiN38s9tFezKk vJNh0orOkfe8OR8gmN/6oT74slArChLZRr2lVlRD8Rq+sbATx8lDwJk0jY7DbDPtWVRk UuJTmh3fRxUGSCGzXK64aB7Hjih4pdzh7HY0MXkz72SNEmFHC2pXiyPm2dSXUIPZLc+d F+S/DjDmGxnB7y6XZFlWXp86JkdOYf1cKqANi2SwhXeGqpMeiD64Z9xrsA9mnWzjc0Bo kF8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697645937; x=1698250737; 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=VJC+C4OtuULaekIgETfG9hZQeFdTuWayXpQ5YRaiN4w=; b=uShypniA/4hZyyoh2rAidO02rLV46HR/5SQKFJNU4adGcgbqKsbh1frTHULHdinSzu KnFqrXj1kwMsdHSJt3tpaTQ3XnJ42kKLn/2pgknuCgNOGD6OH1aszHXt0U8FMulz6k1G fDOPyNdLC9BqClVkFvG6e/9DCcAsq50tsch2oINbMhVqjFNE5iAHR06KHsmgF0JVco9R cpzrLF0rLfVp7C3rwxroQ44ZEwmO2URjWP2mtzp6IS5G0f4OhsQeNQm9KBfcBvr8ONdt l32EN45Hd8pS/flz38BVE1kepJQc87GsRrpYcOM+82PClcac/Z2JlOwikU2DBZ3mdyGl df5Q== X-Gm-Message-State: AOJu0Yxk2ja8tIV3Bf/9TbU48zYJ0hBTwIyM5Ss7l9gU3Ho+16MCYUHp kjFQa3HRSWJm5a42LTiZS9kJzo8+6ZA= X-Google-Smtp-Source: AGHT+IEyC/5eqkKVkMLwJ6n6DXED2z+hXcF3NA1uSNWAQv0tYW9JWBm7ZuVXNvSMVxSCboUAsi626g== X-Received: by 2002:a05:6808:211e:b0:3ae:1298:257a with SMTP id r30-20020a056808211e00b003ae1298257amr7454580oiw.1.1697645936910; Wed, 18 Oct 2023 09:18:56 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id db14-20020a056808408e00b003afe584ed4fsm697390oib.42.2023.10.18.09.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:18:56 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, sboyd@kernel.org, mturquette@baylibre.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 3/5] clk: rockchip: rk3568: Add PLL rate for 115.2MHz Date: Wed, 18 Oct 2023 11:18:46 -0500 Message-Id: <20231018161848.346947-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018161848.346947-1-macroalpha82@gmail.com> References: <20231018161848.346947-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_091900_965932_B2C3ACE3 X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan Add support for a PLL rate of 115.2MHz so that the Powkiddy RK2023 panel can run at a requested 60hz (59.99, close enough). I have confirmed this rate fits with all the constraints listed in the TRM for the VPLL (as an integer PLL) in Part 1 "Chapter 2 Clock & Reset Unit (CRU)." Signed-off-by: Chris Morgan --- drivers/clk/rockchip/clk-rk3568.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c index db713e1526cd..bfbcbb744327 100644 --- a/drivers/clk/rockchip/clk-rk3568.c +++ b/drivers/clk/rockchip/clk-rk3568.c @@ -79,6 +79,7 @@ static struct rockchip_pll_rate_table rk3568_pll_rates[] = { RK3036_PLL_RATE(148500000, 1, 99, 4, 4, 1, 0), RK3036_PLL_RATE(135000000, 2, 45, 4, 1, 1, 0), RK3036_PLL_RATE(119000000, 3, 119, 4, 2, 1, 0), + RK3036_PLL_RATE(115200000, 1, 24, 5, 1, 1, 0), RK3036_PLL_RATE(108000000, 2, 45, 5, 1, 1, 0), RK3036_PLL_RATE(101000000, 1, 101, 6, 4, 1, 0), RK3036_PLL_RATE(100000000, 1, 150, 6, 6, 1, 0), From patchwork Wed Oct 18 16:18:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13427376 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 530F5CDB47E for ; Wed, 18 Oct 2023 16:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6dCB/qjApiO1QaFxYoTWXYTc3UH3I8fgY08TG1S0SvM=; b=S3DcEXpkLTJlAi FR/3PZjUjhccxnKO9rqYAypqp6NYBlkuhBkuEO9Iu45r/LYyDV7CAQ1FiDa/NCLxmgL58Dfx5zeKr RPgZZpJm7cZSoRXHPx9oqsFXeMPEXizbt61LdAMGz2lTArJ+8pdJxcXJpeyw2AaYjDTdjvtkoOSFX u2dWSxi2OfKxdKzoN7L3TqYO3Alylrclm32L+OOXTA+aZ4AjxzblTWDbFYhiNlNEA7Fl/6b5Okz96 PbptMfngRpnlzZCthWDZ1jyLZgspoenB0AHloHLrne6cbnIG7mLbSBpWU9ircMNkDToP9c6BHVBfx rwfwRtc2kaXIz5FzNRpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt9G9-00FABz-1x; Wed, 18 Oct 2023 16:19:01 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt9G7-00FA9o-2d for linux-rockchip@lists.infradead.org; Wed, 18 Oct 2023 16:19:01 +0000 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3af64a4c97eso3846627b6e.2 for ; Wed, 18 Oct 2023 09:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697645937; x=1698250737; darn=lists.infradead.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=hM+gahaFfhqvyzMw+hLPiLwUYVFl/GwZI4lQvIkPZFg=; b=SFyhk6mIQAI24QAFSdZN2kBdI8fstwzNjNwsdprjxZvpTgumBSEiHwdD2GWzBNGN6H YqYDW5j6wCRz6OosqL0TCWZ4IXt23OaH5GKKSEUGaiPz+3LkmHbVKNUtzUqlJ0Tt+D35 HweWhvuU/Y4ubiVIj3K5PT7Y9BdZrGLdvagx0PRJ+dj3yoW5Aq8PwppWp/hHpES7iVAe 69CUYGR2gCAP6EJIOHazAIvDJgaiu5Op3jzL+KUcKpEYYtz2G03b7eQhppI5pT1JLPI4 nyKY2oT4e12nMm2OTX0zKiUyX4hsF0D4TDNRH4ub06DFXtNKqdwWR3jv0xhFsBAsJ0j8 hBig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697645937; x=1698250737; 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=hM+gahaFfhqvyzMw+hLPiLwUYVFl/GwZI4lQvIkPZFg=; b=NSGAmZZL9TluB1v4KGI68OK8jctzEAIbk0wr3wClCww5aPDFdcgIBcTPbD7GHOPR8p 9vpofRVHo0EkL9hm9B2Qg4VdoGsB9me38HBs/nmhRNC2dkacXY0/lEzQnDrmbGAuzigg Rq1LQj9fxDhj3jb6UXSX5DnvS7WOHUWFFULRx/hq+QS6Ujz3oia9gBbp+nOfnVF3up4B DpocYYgVmhoyC6sdVG2b6t8+NEbv+WAmdfowiNuyLwqDxyLFIwKFCC5ncwyyY5VPB9N7 DDevFL2E2oX0FQowuQvhHHBbrPtpsABf37A6UoJq8v7DlYUIMaQZMXvDNJGVG2rZHzVi GCig== X-Gm-Message-State: AOJu0Yz92KMC8I1nH3xv/IJha9fItrWTLAmReqrpf43IForFRyX3jBlC 0u0rqyFOJ7rFETkLlo5Pp85D/W5IZHw= X-Google-Smtp-Source: AGHT+IH4OYf/H6hu8k3PAsRf3mm4jsjcixitYV7dNNGP1JInDwCe05WxnBR6TBxPI5AC2/tf1wVZoA== X-Received: by 2002:a05:6808:f8f:b0:3af:b6ea:2e2 with SMTP id o15-20020a0568080f8f00b003afb6ea02e2mr6734005oiw.59.1697645937480; Wed, 18 Oct 2023 09:18:57 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id db14-20020a056808408e00b003afe584ed4fsm697390oib.42.2023.10.18.09.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:18:57 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, sboyd@kernel.org, mturquette@baylibre.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 4/5] dt-bindings: arm: rockchip: Add Powkiddy RK2023 Date: Wed, 18 Oct 2023 11:18:47 -0500 Message-Id: <20231018161848.346947-5-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018161848.346947-1-macroalpha82@gmail.com> References: <20231018161848.346947-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_091859_854003_AA412275 X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan The Powkiddy RK2023 is a handheld gaming device made by Powkiddy and powered by the Rockchip RK3566 SoC. Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml index a349bf4da6bc..a6612185a7ff 100644 --- a/Documentation/devicetree/bindings/arm/rockchip.yaml +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml @@ -674,6 +674,11 @@ properties: - const: powkiddy,rgb30 - const: rockchip,rk3566 + - description: Powkiddy RK2023 + items: + - const: powkiddy,rk2023 + - const: rockchip,rk3566 + - description: Radxa Compute Module 3(CM3) items: - enum: From patchwork Wed Oct 18 16:18:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13427380 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C2C46CDB482 for ; Wed, 18 Oct 2023 16:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xrLkHOB25LCCSiIxttMDpj+GRZhhJunkFVyHhlq16/s=; b=VpLPh3vngKfIsF emMiqC6GNrd+MIm4KB8OLJURMVmJ0Ma5JYDTlnqvC7kVuKx++yIlU9GhxhqAmUoNlQ4Kq2fQxbgJr VOs9eScxX0L4crh75M2dWxUe9YzoKZ2CeMBGQeSP5PHsM+62oU3wUUStscRxEfebbo5WBW0QSsnkW /i+7mjUkv7a4Cigt0HT9DDI8cNGsRK1t52rSOD9xz+4WrKBGjq4e+h0qpIz39S61iie3wR9LfRhS+ 5KJrJ/TTe+4n0C941OHAjDwvEncSMCvvhNmoFiIpZBrTX2il2ICIUFgxZhcCK2RSdw7Yz9/+S31fk n4tE3nmsewwNuY4kxpLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qt9GD-00FAEh-34; Wed, 18 Oct 2023 16:19:05 +0000 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qt9G8-00FAA7-1g for linux-rockchip@lists.infradead.org; Wed, 18 Oct 2023 16:19:02 +0000 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3af957bd7e9so4469891b6e.3 for ; Wed, 18 Oct 2023 09:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697645938; x=1698250738; darn=lists.infradead.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=Cncp6Vqz2tNKyeMpBE+MzO1YFnQJcaDwVPsn6h2VtJs=; b=J6g+YZbNCQ3Wkk2WVAY+sDuDCyTlRntTs0P2aSOwB3FK6qf325T/3yc4dtufMkOsPg 24miKVsEG2P0SsVXAFXlEpj69e3tlYbdUp3IrwC+Jdgxqou9AaDUKgmg9TqotKYbULWT lKnwDnw9z0E38KE+kJsD7b6F9rqEMFqSrzXwhfpsNmapZFe0WMCoBX21zzfQs1klxtqQ 34ws+8PrKzI55pW91Q+dsn6pCMQsEzekXo4La7gEUrs34WZJUMpJLM5kwdMAIPrJV6SK VoBBhwVfssBEwD4kkWyUQ9LxZq/EPODKMT5iOtsauydr3pkUBUY2gG1Xw+6QBZyaCbjw g+pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697645938; x=1698250738; 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=Cncp6Vqz2tNKyeMpBE+MzO1YFnQJcaDwVPsn6h2VtJs=; b=IH2EgMJit91T2kmXczVhPDeoOUWuLGtwUOg7OwMhyUjU+XhLhigcQ2hJ7j2mw5W9Nf pKkWwi7nHPUFVxa3oV8G65gAen2dRZokxlTSYpPTvML2lV3Z+Oc7LZz5TiNkAINg6laF 9sE3M8gUrUNFcveIw7icAze4Ugt3AySOErbBYGmGOZZdHz++uBlus3dDmLCXMD0LFQQB KK75qiscrC4e5Wao5pz78ugqsShnOxa5hQPE4xVO2ryAZ4Jw0vWkdQeRqpf2AmiGbSc1 KUSDaPsIZVmfLdsljS6bFqk0MaeBieHR/yLUvl9RvbyVTVDq9NWt0wnjIxSKQOGQV722 0vig== X-Gm-Message-State: AOJu0YyPoUp4HwruivGu0DvfzQ2TtxGBhCOaf7aoCvHjf+MEtG2eGTOD khWcrZZgTP+JI7gGq+RGJHfyUEy9qBc= X-Google-Smtp-Source: AGHT+IE/YzedQcbGDsoYXAmqsp/sqSQwZYk7tpz3fGbIapByB8nFBl2o/e0043FsZ2iRLZAQsAXZaQ== X-Received: by 2002:aca:1112:0:b0:3af:983a:8129 with SMTP id 18-20020aca1112000000b003af983a8129mr6150694oir.53.1697645938112; Wed, 18 Oct 2023 09:18:58 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id db14-20020a056808408e00b003afe584ed4fsm697390oib.42.2023.10.18.09.18.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 09:18:57 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, sboyd@kernel.org, mturquette@baylibre.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 5/5] arm64: dts: rockchip: add Powkiddy RK2023 Date: Wed, 18 Oct 2023 11:18:48 -0500 Message-Id: <20231018161848.346947-6-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018161848.346947-1-macroalpha82@gmail.com> References: <20231018161848.346947-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_091900_560079_B11AF476 X-CRM114-Status: GOOD ( 15.73 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan Add support for the Powkiddy RK2023. The Powkiddy RK2023 is a handheld gaming device with a 3.5 inch screen powered by the Rockchip RK3566 SoC. The device is almost identical to the Anbernic RG353P except it lacks eMMC, a function button, a touch screen, no UART headers on the board, and the panel has slightly different timings. Signed-off-by: Chris Morgan --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3566-powkiddy-rk2023.dts | 161 ++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 3f01b429a3aa..9ef64cfb8392 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-anbernic-rg503.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb30.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rk2023.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-radxa-cm3-io.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts new file mode 100644 index 000000000000..5740412f6b2b --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts @@ -0,0 +1,161 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include +#include +#include +#include "rk3566-anbernic-rg353x.dtsi" + +/ { + model = "RK2023"; + compatible = "powkiddy,rk2023", "rockchip,rk3566"; + + aliases { + mmc1 = &sdmmc0; + mmc2 = &sdmmc1; + mmc3 = &sdmmc2; + }; + + battery: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <3151000>; + charge-term-current-microamp = <300000>; + constant-charge-current-max-microamp = <2000000>; + constant-charge-voltage-max-microvolt = <4250000>; + factory-internal-resistance-micro-ohms = <117000>; + voltage-max-design-microvolt = <4172000>; + voltage-min-design-microvolt = <3400000>; + + ocv-capacity-celsius = <20>; + ocv-capacity-table-0 = <4172000 100>, <4092000 95>, <4035000 90>, <3990000 85>, + <3939000 80>, <3895000 75>, <3852000 70>, <3807000 65>, + <3762000 60>, <3713000 55>, <3672000 50>, <3647000 45>, + <3629000 40>, <3613000 35>, <3598000 30>, <3578000 25>, + <3550000 20>, <3519000 15>, <3479000 10>, <3438000 5>, + <3400000 0>; + }; + + /* Channels reversed for headphones. */ + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "rk817_int"; + simple-audio-card,format = "i2s"; + simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Headphone", "Headphones", + "Speaker", "Internal Speakers"; + simple-audio-card,routing = + "MICL", "Mic Jack", + "Headphones", "HPOL", + "Headphones", "HPOR", + "Internal Speakers", "SPKO"; + + simple-audio-card,codec { + sound-dai = <&rk817>; + }; + + simple-audio-card,cpu { + sound-dai = <&i2s1_8ch>; + }; + }; + +}; + +/delete-node/ &adc_keys; + +&chosen { + /delete-property/ stdout-path; +}; + +&cru { + assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>, + <&pmucru PLL_PPLL>, <&cru PLL_VPLL>; + assigned-clock-rates = <32768>, <1200000000>, + <200000000>, <115200000>; +}; + +&gpio_keys_control { + button-r1 { + gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>; + label = "TR"; + linux,code = ; + }; + + button-r2 { + gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>; + label = "TR2"; + linux,code = ; + }; +}; + +/delete-node/ &{/i2c@fdd40000/regulator@40}; + +&i2c0 { + vdd_cpu: regulator@1c { + compatible = "tcs,tcs4525"; + reg = <0x1c>; + fcs,suspend-voltage-selector = <1>; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1390000>; + regulator-name = "vdd_cpu"; + regulator-ramp-delay = <2300>; + vin-supply = <&vcc_sys>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; +}; + +/* + * Device has 2 controllable LEDs (a red and a green) along with a red + * LED that cannot be controlled and is always on when device is + * powered. + */ + +/delete-node/ &{/pwm-leds/led-2}; + +&leds { + green_led: led-0 { + color = ; + function = LED_FUNCTION_STATUS; + max-brightness = <255>; + pwms = <&pwm6 0 25000 0>; + }; + + red_led: led-1 { + color = ; + function = LED_FUNCTION_CHARGING; + max-brightness = <255>; + pwms = <&pwm7 0 25000 0>; + }; + +}; + +&panel { + compatible = "powkiddy,rk2023-panel", "newvision,nv3051d"; +}; + +&pwm5 { + status = "disabled"; +}; + +&rk817 { + rk817_charger: charger { + monitored-battery = <&battery>; + rockchip,resistor-sense-micro-ohms = <10000>; + rockchip,sleep-enter-current-microamp = <300000>; + rockchip,sleep-filter-current-microamp = <100000>; + }; +}; + +/* There is no UART header visible on the board for this device. */ +&uart2 { + status = "disabled"; +}; + +/delete-node/ &vibrator;