From patchwork Mon Feb 12 18:49:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13553900 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 B5696C4829E for ; Mon, 12 Feb 2024 18:50:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 28FC110E633; Mon, 12 Feb 2024 18:50:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KsSyL+ot"; dkim-atps=neutral Received: from mail-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id C2CFA10E6A3 for ; Mon, 12 Feb 2024 18:49:59 +0000 (UTC) Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-59a6f2eecf6so55662eaf.1 for ; Mon, 12 Feb 2024 10:49:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707763798; x=1708368598; 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=ZiRsZjgJE08mlqExCXE02bhHnOiYxOBr2Vmf+IkslQ0=; b=KsSyL+otcaEvLw3xVgCHFcbxMuBsBFB6Y89AlPfOqRkP+F3qBf6kiZCeydRTZgB8tS UisUMxSsrqHCutOGyeN/nKssS2yChhC1X/4z8PEq3Lhh0sHu78LcjoZfDUiOeHk8BknY Q3VBmOtOy2Iw8UDp5I3N9vbKexkFpMxAMzbz5ejlWkMzT3JxO80uMb3Qv7ta0vXSC11l uCfll+0Xai1tRCfDAVot8xXUjxzEFDWgMNVGgQE5VUFeuMZBj5I7M0rp0/tJ9BRgK7Yi q3P9t634hPRVhNOtxA/BFu5UD0mC+duXB+Qb60btS08NNeZg/ZHGceO+68skXvQRiFVv 4olg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707763798; x=1708368598; 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=ZiRsZjgJE08mlqExCXE02bhHnOiYxOBr2Vmf+IkslQ0=; b=F+tDzkSSWOU2C5Fz45QMrjqcDa9KNRsnNg8fOH5bVWOCsMyVV8cg7CjYw87cLp3YtE 5eW1IY7kuw43wkwpgqRsHx8/O4lJh6316JHciVxMhCZGs1eRb0YmRuPirgduUQkOLQkK hn/Fz76QxPRhZ5cG5l7PeVBxVmnJmInV5flO9WdDwIQCTzWFC4cF+24Xap6FKe6rDuIj HjajMnl+ZcH+EADW1fQbLbZHMX0xdH+MYiPO1Zw7wCXp2CYXiTzjMMy3sIYOyYRvC43B cyh5+nwPorRtDXceLUV7M9Pb1q7RwO5WMerrK6J106WNy36Fe0Jhk+ReLoQjjxVyp2G7 2m9Q== X-Forwarded-Encrypted: i=1; AJvYcCUWssEYmX1MjPkCmwi/0RcOr2KuboEdoMxqP2RhG5IMTgAy+uOe5N0qovFn/+MhBkYvmtEyLucTz9d41RNDXG9hZ4SfayGVMBidHKq+NNo8 X-Gm-Message-State: AOJu0Yx6nAtE+ePMrYT3s1xeTjbaoFPvf3ScVZhsApaGPGNRcNtY67zD ycOOlPQTIXHcGgAAEzm/TbFCfaGNEQxKdlrRDbxLmXJWi7xJvi3OwFbBbJoq X-Google-Smtp-Source: AGHT+IGSw06NfJXdmlcQHzjnL3FF9bOgGHPCk5XmRWBD6/JKfOeCWsmU3Ve0BIUPqa8izDBTGRQqZw== X-Received: by 2002:a4a:354a:0:b0:59d:2163:2d6c with SMTP id w10-20020a4a354a000000b0059d21632d6cmr5944522oog.0.1707763798563; Mon, 12 Feb 2024 10:49:58 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWoo6AEFNlrC3bnOrjvKOb31aIvRIF0598Zzcq9BsCtpGsYrA4fxl/iW5UZpsNBm53a9TCD1Jnuu//P/4KrigxQpIA9bkXdgxmTZvvZA8g+ovwOz0PeWkeK+ZM4Vp8RyiFtHgSGSzeu8Q91kOPDWAgyBsbLr9CIGEJ0z6q3Ek5ISWrXJrXSZ8vf2U81WoR56oZoNQYkP6EHI6TIA7hC7KJtmN0LwxtlUvyJd8YBQrswea3FlmdawIEqJOL7/iGxZQ6Q6n6LmgjnTJ44nZ+PIoUjylOYgq2CveyDVbRStx2ZvNW1rKsEqNQ6llOQ+pI5ki687bsZOP0Q31WDgbstnP3+Pq7bC+FzwoiqanoZhICF2/mNPxCSqLp8C+Sy9oprwPynv3ocB7zKO6r0P0TEqvA/2Yjy9gPMzI6+fg15PZto26pEWOwQd6CJbvDmmxU0q5PnU50mKw/dgSikuhu3WRQXwr1pAWI3E8UAzHGKsQPii9+BF3x+thkL804XYXwYn3VNFyxy3w0SYBhDN/BcnsCVhSuO/CYFSRWCEQbLyKudfjpg0xTrWmZf86WT Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id b7-20020a4a3407000000b0059d5360c62esm171939ooa.11.2024.02.12.10.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:49:58 -0800 (PST) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, quic_jesszhan@quicinc.com, neil.armstrong@linaro.org, megi@xff.cz, kernel@puri.sm, agx@sigxcpu.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 1/7] dt-bindings: display: st7703: Add Powkiddy RGB10MAX3 panel Date: Mon, 12 Feb 2024 12:49:44 -0600 Message-Id: <20240212184950.52210-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212184950.52210-1-macroalpha82@gmail.com> References: <20240212184950.52210-1-macroalpha82@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" From: Chris Morgan The RGB10MAX3 panel is a panel specific to the Powkiddy RGB10MAX3 handheld device that measures 5 inches diagonally with a resolution of 720x1280. Signed-off-by: Chris Morgan Reviewed-by: Guido Günther Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml index 97cccd8a8479..8dfe8951bf5b 100644 --- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml @@ -22,6 +22,8 @@ properties: enum: # Anberic RG353V-V2 5.0" 640x480 TFT LCD panel - anbernic,rg353v-panel-v2 + # Powkiddy RGB10MAX3 5.0" 720x1280 TFT LCD panel + - powkiddy,rgb10max3-panel # Powkiddy RGB30 3.0" 720x720 TFT LCD panel - powkiddy,rgb30-panel # Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel From patchwork Mon Feb 12 18:49:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13553907 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 C1445C48BC1 for ; Mon, 12 Feb 2024 18:50:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B1DE10E6A3; Mon, 12 Feb 2024 18:50:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mOd49Y9c"; dkim-atps=neutral Received: from mail-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72EDB10E7A6 for ; Mon, 12 Feb 2024 18:50:00 +0000 (UTC) Received: by mail-oo1-f44.google.com with SMTP id 006d021491bc7-59caf51d4bcso782435eaf.1 for ; Mon, 12 Feb 2024 10:50:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707763799; x=1708368599; 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=jZFPsjehsGahfaDDXv6wayCfEx1VbKmklsIBWo0yYyU=; b=mOd49Y9cbvQStfJaeW+SJLKv9AAQaYeUFebka1phGhWLeLJ/tZ/BD8iSHbG/Ek2ko0 1GyvrcKpXK/Bpog28zvqM9ZclPXW9td5JZ5yR26k5iZyfGRfNz5+2eXWyD7nrtCF6Ozb 2IXTGAfY8H2AUn/MCx2JNjc9Evpw8G7LfnRKcxIlrKtg2HUldZKUZROALmd/YmWzThcp xNE7R8EBNIVWTAnKg2hZ28KgVuf7GdUCCJlcfx4M6Jk2i7f+llfEUDom/5BNmY5wf2Uq kazItOXyVWiCsTZ8nHQKeLOui9CuV5oxINuZi9JaJ8RRs+nWkQL77ouFMZYZsz1TRvgl C3wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707763799; x=1708368599; 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=jZFPsjehsGahfaDDXv6wayCfEx1VbKmklsIBWo0yYyU=; b=OYXh/vs2QLllKo/8aSQ6ytorLcgRIRdsNFVXnitCPkeQReOnXwoj+DEBPdgkFFj1VT 7cnwRAUAlQ64KDSH0+zVum/AThgsD7YqJFjGgbKAZSQN9clPE1EDa5ni5eeeIVdmc8RG p3jEbZx4ejkFsEL54s4pFhCSiKywxMvNcc4kyJlci97chIe6yP8U0n94DBaVuLLBIyWN mSp2ONt4BqOu8Ror9ZhRiv/Vg23qUvE8Km99T1I2bHAritCtLklIhYKMPdcQ80b4DhMq 5xaJoZ79JItexDJ0HTsnDk8Igt2gKJXvuQpKUTt+W6C/XDkiEfdIrAeuwpiuN6gMgWc2 ojuA== X-Forwarded-Encrypted: i=1; AJvYcCXvcBUSTA4oSjFKzBl90O49ttjIxjOtihzQJiAIvQFn9YfU5D5qcmdMecXe3v3Dqb7VQE4ICkcSC9qSbcDuyC6D4z4ydC27vJAHLwRAtTW1 X-Gm-Message-State: AOJu0YxKgirW1Q/b5AL/rrlEWqngNNC2VsscpQnu7pAUbZ8qo+xz6Uiv JxBLRBNyg5v3+HIoL1DTkdDm97rK8n3KC0sUyRTQzw+X6wYIUlhZ X-Google-Smtp-Source: AGHT+IEjZ9O0me5zTfECpVnc2oS1pkECPbe/I+XKgyEsT9zWfV++kcEm/14iIibhX6edaB/F044vpQ== X-Received: by 2002:a4a:d091:0:b0:59a:50fc:153 with SMTP id i17-20020a4ad091000000b0059a50fc0153mr162021oor.0.1707763799213; Mon, 12 Feb 2024 10:49:59 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU5YSNg5lkpy6/qPSoe2SPJUCYgqmNiULOaruPQ16MIpRzRwP1Y9KLgomxtYLLG3kb6J6iDWS7cswL7GI8ncPjgUKcnN/I84NxxX8mMuUvkmiyhj0TFwZlN/6PULc2rnZez5xkVNPmAzf6ottmp7yEIFzR/VZB+1fDL2Z/QydhNnqb6symmTvSQX2J+QcjXTrC3x7CqrOxLymqdUZnaln9Beb+PWYNjGcXAX+9l8m47UJnLsefTZntGRKNgdyrkBikxM+X4Fqo/YvE3NRsKjTiOCrgTVSasZ6obdSLcbwgmqysbvB5eGQiB8HjQBD43ieG0HExvf9B2t9PkYWvk2wZWcgK70EMlgWWZ18qOWQbVfhMb3R7AYpKGFk5A9uCJEVpjbwVSZQs4EHTRVqBPcBVIwfN4CG5I58qPaRZP65kU1WVGhUQZ8jj3GD++QzCJ3q9SuEtKZOYoeSDw6Pekw/bta2KDVv2Z0rDCQgYsokWz++H8bSRmWxRVkfSYmX8dS4W97/ast+Kxs/xtka9qtetuYrxA16TTgtm8qg5pBa/ZhxKyqiOsV2osrzuy Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id b7-20020a4a3407000000b0059d5360c62esm171939ooa.11.2024.02.12.10.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:49:59 -0800 (PST) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, quic_jesszhan@quicinc.com, neil.armstrong@linaro.org, megi@xff.cz, kernel@puri.sm, agx@sigxcpu.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 2/7] drm/panel: st7703: Add Powkiddy RGB10MAX3 Panel Support Date: Mon, 12 Feb 2024 12:49:45 -0600 Message-Id: <20240212184950.52210-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212184950.52210-1-macroalpha82@gmail.com> References: <20240212184950.52210-1-macroalpha82@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" From: Chris Morgan The Powkiddy RGB10MAX3 is a handheld device with a 5 inch 720x1280 display panel with a Sitronix ST7703 display controller. The panel is installed rotated 270 degrees. Signed-off-by: Chris Morgan Reviewed-by: Jessica Zhang Reviewed-by: Guido Günther --- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index b55bafd1a8be..939ba05c9b58 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -521,6 +521,96 @@ static const struct st7703_panel_desc rgb30panel_desc = { .init_sequence = rgb30panel_init_sequence, }; +static int rgb10max3_panel_init_sequence(struct st7703 *ctx) +{ + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); + + /* Init sequence extracted from Powkiddy RGB10MAX3 BSP kernel. */ + + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xf1, 0x12, 0x83); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETAPID, 0x00, 0x00, 0x00, 0xda, + 0x80); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0xc8, 0x02, 0x30); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, 0x10, 0x10, 0x28, + 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x04, 0x04); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x78, 0x78); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22, 0xf0, + 0x63); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, 0xf9, + 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x44, 0x25, 0x00, 0x90, 0x0a, 0x00, + 0x00, 0x01, 0x4f, 0x01, 0x00, 0x00, 0x37); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x47); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, 0x73, 0x73, 0x50, 0x50, + 0x00, 0x00, 0x12, 0x70, 0x00); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, 0x25, 0x00, 0x32, + 0x32, 0x77, 0xe1, 0xff, 0xff, 0xcc, 0xcc, 0x77, + 0x77); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETECO, 0x82, 0x00, 0xbf, 0xff, + 0x00, 0xff); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETIO, 0xb8, 0x00, 0x0a, 0x00, + 0x00, 0x00); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCABC, 0x10, 0x40, 0x1e, + 0x02); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0b); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, 0x00, 0x04, 0x07, + 0x2a, 0x39, 0x3f, 0x36, 0x31, 0x06, 0x0b, 0x0e, + 0x12, 0x14, 0x12, 0x13, 0x0f, 0x17, 0x00, 0x04, + 0x07, 0x2a, 0x39, 0x3f, 0x36, 0x31, 0x06, 0x0b, + 0x0e, 0x12, 0x14, 0x12, 0x13, 0x0f, 0x17); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, 0x03, 0x03, 0x03, 0x03, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0x80, + 0xc0, 0x10); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, 0xc8, 0x10, 0x08, 0x00, + 0x00, 0x41, 0xf8, 0x12, 0x31, 0x23, 0x37, 0x86, + 0x11, 0xc8, 0x37, 0x2a, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, + 0x88, 0x20, 0x46, 0x02, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0xff, 0x88, 0x31, 0x57, 0x13, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, 0x00, 0x1a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x8f, 0x13, 0x31, 0x75, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0xf8, 0x8f, 0x02, 0x20, 0x64, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0xf8, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_EF, 0xff, 0xff, 0x01); + + return 0; +} + +static const struct drm_display_mode rgb10max3_panel_mode = { + .hdisplay = 720, + .hsync_start = 720 + 40, + .hsync_end = 720 + 40 + 10, + .htotal = 720 + 40 + 10 + 40, + .vdisplay = 1280, + .vsync_start = 1280 + 16, + .vsync_end = 1280 + 16 + 4, + .vtotal = 1280 + 16 + 4 + 14, + .clock = 63800, + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, + .width_mm = 62, + .height_mm = 109, +}; + +static const struct st7703_panel_desc rgb10max3_panel_desc = { + .mode = &rgb10max3_panel_mode, + .lanes = 4, + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_MODE_LPM, + .format = MIPI_DSI_FMT_RGB888, + .init_sequence = rgb10max3_panel_init_sequence, +}; + static int st7703_enable(struct drm_panel *panel) { struct st7703 *ctx = panel_to_st7703(panel); @@ -784,6 +874,7 @@ static void st7703_remove(struct mipi_dsi_device *dsi) static const struct of_device_id st7703_of_match[] = { { .compatible = "anbernic,rg353v-panel-v2", .data = &rg353v2_desc }, + { .compatible = "powkiddy,rgb10max3-panel", .data = &rgb10max3_panel_desc }, { .compatible = "powkiddy,rgb30-panel", .data = &rgb30panel_desc }, { .compatible = "rocktech,jh057n00900", .data = &jh057n00900_panel_desc }, { .compatible = "xingbangda,xbd599", .data = &xbd599_desc }, From patchwork Mon Feb 12 18:49:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13553904 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 0048DC48297 for ; Mon, 12 Feb 2024 18:50:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D3BFC10E7BD; Mon, 12 Feb 2024 18:50:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XU1Zx49z"; dkim-atps=neutral Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) by gabe.freedesktop.org (Postfix) with ESMTPS id 02FB810E7A6 for ; Mon, 12 Feb 2024 18:50:00 +0000 (UTC) Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-599fc25071bso2443060eaf.3 for ; Mon, 12 Feb 2024 10:50:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707763800; x=1708368600; 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=m8VPhUxVNMumxmegz16wtqJemHSZk+dsg1qRV02Sa/A=; b=XU1Zx49z4gPPipGQdlUYHaM5x57zvArlBBcqlzLHBxvPiEH9z3Jrb+1j8YNYGaKWp7 kYKo3+b83hyhOpxEa9jASzANrHDQC1YTPzwGIISC+W454/qS2zclHMLQOf1Q38VZPkZl WJrjsFUhk+8NcXXQVmZ4bVC1XquEWm/M4eXFFQCxsX3Cm1y16AvTAu1/RDC+LYZTr9lh s2FOyLJbACd96U5knffd1lUTT4tKLF/g5tCgL450IPFrl0fg6CQXASF7Hxoc0JezL8La uXUE+9bJFzgkDS76RaqgaxsManxYKUgSlS1YVm5yp3AcV7aPD7HaIr+JZGi2GP0Q17dv Lueg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707763800; x=1708368600; 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=m8VPhUxVNMumxmegz16wtqJemHSZk+dsg1qRV02Sa/A=; b=QAeUY2VZ519lRiczLY4+9kfICA5NZTjZmbWcRq/bouBF9Zzksj9NDP0G/JUXo09P6g A0y0oQeYOw2J7mXmjJXZpzKuZxYiEl27qoodBM4XHJr1DwbG8Oy3ilSmS29AQlb7Gx2I m4M5+jkvX3p9LWdrzBRbmVnh9BEgxa/0cnwQXwlUl5BfV4ldMEKcl5cvBcG06spB1dXn QGO6EOvwkJSopkw1sAc5qTS0PIa5k5URz7bdOCTvz3uAEVynTZ1uKa1X+7t2DrS2VzIs vlEX1haXFsseBeNvAi6kYi+v3chRjvvWwoXxv6XvXC8skYJ9UNN7NBvwtReqSAdnuACv ZFTQ== X-Forwarded-Encrypted: i=1; AJvYcCXiQzKT7omFmXQ9tnhukcluec5J3ze8PXFund+g5yztzRdCqqW8ip+00iJ4tdirLIcUJslLDMYrQvTk+pk7wF+6h+lyL6ogQ5k49+6MjOTU X-Gm-Message-State: AOJu0YxVuMv7Iw9oT90XJUDNOlLqUuetHh0qV0xgbN1NF1eM7n+g0lCF LmaPB/l76wQbXBq0nxLWTTsUOAs0pJOzv2hABeI1UKWEhE12OlhC X-Google-Smtp-Source: AGHT+IFwgajYnNAT2DG3t1Dz1gR/jo0jukUytaecVSmzqrrmGdGsu+3jEnD6ECto3ArNVJhamBZrrw== X-Received: by 2002:a4a:8557:0:b0:59d:35d7:a565 with SMTP id l23-20020a4a8557000000b0059d35d7a565mr6684550ooh.3.1707763799981; Mon, 12 Feb 2024 10:49:59 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUAw9xmcZUUlJhRIP1qbo/rbWP6bZX5NSRm1WiUs2cyTvXQAuW2comimjVFLv6zQTgkrTRPLnBx2oFBFI0EUvHjaMhUL9qtGeonOQfsgadEu4lGsth6yuGSBgSw8q3CFjaSDWhLpFvdzS9/sLxxo9O99OyKQY9RycEe8W6djAuvkVZ0qLGQcDUuhwvGBOSb6ONrFDBejtFeFh2J48R7vvGLWARf3JevjXO7M9AoBmCluqfME+8bAf8XmGd8pwxTN0e/fXe+Fr9TdloVoaI7iKtZG5zVvXVsyDHuRgp9WQY0cQ2Idg9tWao3U1BM4XpgHYtCqqiZli1AyFBhUv9wkfvNePGNG+7M17faLFjB8dxmhlGEpBT6AABPM5MJM2gO2vzulHIWB8S7efK1u+adkraT99kRl3FTldMGvwKhVS/AmE3hcx7hudVPtcmMxYv2tOwg5MZ+xyPl/YHVWZRPbmE0wAJPhtbRLK4tD947MRrZOEdYMuUalJN0uATIud65dgI+PRCkNb9HqvTYyTDMdqMgYVNuNeHMhMjKogUhOs2LMHKk0a8C9+X8BDaH Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id b7-20020a4a3407000000b0059d5360c62esm171939ooa.11.2024.02.12.10.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:49:59 -0800 (PST) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, quic_jesszhan@quicinc.com, neil.armstrong@linaro.org, megi@xff.cz, kernel@puri.sm, agx@sigxcpu.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 3/7] dt-bindings: display: Document ST7703 panel rotation Date: Mon, 12 Feb 2024 12:49:46 -0600 Message-Id: <20240212184950.52210-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212184950.52210-1-macroalpha82@gmail.com> References: <20240212184950.52210-1-macroalpha82@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" From: Chris Morgan Document the rotation property for ST7703 based panels. Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski --- .../devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml index 8dfe8951bf5b..97e0d14790e3 100644 --- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml @@ -46,6 +46,8 @@ properties: backlight: true + rotation: true + required: - compatible - reg From patchwork Mon Feb 12 18:49:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13553906 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 621F2C48297 for ; Mon, 12 Feb 2024 18:50:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 85C5410E80D; Mon, 12 Feb 2024 18:50:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="d5CrfH35"; dkim-atps=neutral Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com [209.85.161.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA39910E7BD for ; Mon, 12 Feb 2024 18:50:01 +0000 (UTC) Received: by mail-oo1-f52.google.com with SMTP id 006d021491bc7-5957ede4deaso2216048eaf.1 for ; Mon, 12 Feb 2024 10:50:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707763801; x=1708368601; 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=vMsXKmpw6dLT65KkRINMdKyXBzxk9IKeYWz+mH4JfHk=; b=d5CrfH35DW0uPKlicq3BzqmHxFZ8XKFrLpkXN3z5cGGFn5MBk3fRC6NrFWzSOoltM7 e76/cbjgU0GTmjfOZamvzhzx4hYfmoyt1H8ynDJdYYiEJxefBncEoLSaD+FNPRJ5yxRb XMKqICpiLuI09+pEEtr1ZOEtkt5mcmc83FFCNENfGfzWtZD8OT7SgGA319bTYOk0PGnO iDPEqt/KTqdeWTxf6syS4bI3CuAi6U23rOVFTM5ppRqZhIL30RvzjHzTTU1oAbwxk95+ KbPLQoXCu4yLpSt1JGRlvoXOAAnyQu01W2gk44omXOahwWlRbc/9c7g+CvvjM4yuE6GY bDnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707763801; x=1708368601; 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=vMsXKmpw6dLT65KkRINMdKyXBzxk9IKeYWz+mH4JfHk=; b=lGQ+qqMq5XknbKO8Z/0n2zGEurlD50k+rF2v6bJaQSW7eCfkNHDfQHD2AvSlEg/7VV BFdRiu6krgoXTsUsIoSb8hIbX9Ld862ucJCNVSd6cMnLEDpetuSQHubi6jRPKM8OsoWD uXbxdm+cTuWM8EtHi8W5H2QRAjM0SzMSIGBVNFLlouJeRSjK0Wi4tgQ/CXeG0WOlwtWR edl6gEQaUmLbZ2scweN59k1AfP39Bi+gRdlp5wUwADUzH1LZ6I72mmU3fAS8cS0nhZsA fULS4ZoHmE5zOxhfdUP94MAYWls+PEPJgHIXtlzQ7N38ESnFgMJst5LxBLGVLqkECBbf TtUA== X-Forwarded-Encrypted: i=1; AJvYcCU/YjxjxEUh5gtdTSSeqmrgH0f5FC3m/AUvWCboGQ/pMMpMeD5MJNFurlRf8HBaoakZ5Et2pRUaa5/x0g/KpGWoFQWZ3EY4imkKc4ooyRKE X-Gm-Message-State: AOJu0YwITY/BZaDlCy8/oFfvyQ+arItLycJ600iTfJkhkEHLkGnJSVpl O6hiOQO2EY7Xkjy2RB4ugHU662/F6Pw3IPUrQjWVwrB8mNq1VSjs X-Google-Smtp-Source: AGHT+IH21rnnnVfgZxMZxLUtwT8WNw2n6SGokaZ3Z2BAo9BcO1XqzYus1bbwbxmJwBapyjsetWPvxQ== X-Received: by 2002:a4a:6c4b:0:b0:59c:8dea:ad3 with SMTP id u11-20020a4a6c4b000000b0059c8dea0ad3mr5149094oof.9.1707763800850; Mon, 12 Feb 2024 10:50:00 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVeJe5sdeCNV8dOxqKNJ9p5ZaVFhlpVYq2mMRB0iQCgeCAmy4SV/fbbtMK7Gv3j6SSGe4sJ7VuAF1+TJbw/86y94Eng46FiRZUGjaGIuPMN6IEjjHBTUQNA6dOgerspmMSEvhynLEv0Aasw1sCwXDvrTCAnKyQJIxUOE263WYCGTjAyObHHtwWdsJhRNqI+4yJJrDGZ5TaEbsdRRTMHaTyI7Rq9OtAF9n8spX4CUBU1mHJoVHOVEqLbH8RzSkVlbfGGPy7JZl5YDXYR10FlFS/7IaNHH4D063iejoOIDBiOS3HYqpn2abyQ+m7FyEDd6bqhV7ElNtkkkRkzBbu9YVyQtjDgd1Az/OprBux2PDozS9C5JsI4fRcqdY22gJVQP9n7UT5mnF8mi2yqUSycVtu6kccC+LRThhEQw2zHHEit/yK121dpMaJAIElU0fvKIM9T75f+S8imX/IfWrnJczKtehNeZyVlR9K/OGDNdMs3WMjApO+Y1I2qihS9rKKMPIVQ1vadUKwVbLq8tJz87XBQ93vKeSe6l2yNSwWg15RB+woEo0fnEv0+e5qh Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id b7-20020a4a3407000000b0059d5360c62esm171939ooa.11.2024.02.12.10.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:50:00 -0800 (PST) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, quic_jesszhan@quicinc.com, neil.armstrong@linaro.org, megi@xff.cz, kernel@puri.sm, agx@sigxcpu.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 4/7] drm/panel: st7703: Add Panel Rotation Support Date: Mon, 12 Feb 2024 12:49:47 -0600 Message-Id: <20240212184950.52210-5-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212184950.52210-1-macroalpha82@gmail.com> References: <20240212184950.52210-1-macroalpha82@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" From: Chris Morgan Add support for panel rotation to ST7703 based devices. Signed-off-by: Chris Morgan Reviewed-by: Guido Günther --- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index 939ba05c9b58..a3e142f156d5 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -62,6 +62,7 @@ struct st7703 { struct dentry *debugfs; const struct st7703_panel_desc *desc; + enum drm_panel_orientation orientation; }; struct st7703_panel_desc { @@ -743,12 +744,20 @@ static int st7703_get_modes(struct drm_panel *panel, return 1; } +static enum drm_panel_orientation st7703_get_orientation(struct drm_panel *panel) +{ + struct st7703 *st7703 = panel_to_st7703(panel); + + return st7703->orientation; +} + static const struct drm_panel_funcs st7703_drm_funcs = { .disable = st7703_disable, .unprepare = st7703_unprepare, .prepare = st7703_prepare, .enable = st7703_enable, .get_modes = st7703_get_modes, + .get_orientation = st7703_get_orientation, }; static int allpixelson_set(void *data, u64 val) @@ -817,6 +826,10 @@ static int st7703_probe(struct mipi_dsi_device *dsi) return dev_err_probe(dev, PTR_ERR(ctx->iovcc), "Failed to request iovcc regulator\n"); + ret = of_drm_get_panel_orientation(dsi->dev.of_node, &ctx->orientation); + if (ret < 0) + return dev_err_probe(&dsi->dev, ret, "Failed to get orientation\n"); + drm_panel_init(&ctx->panel, dev, &st7703_drm_funcs, DRM_MODE_CONNECTOR_DSI); From patchwork Mon Feb 12 18:49:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13553905 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 8F596C48BC4 for ; Mon, 12 Feb 2024 18:50:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 39E5310E7F4; Mon, 12 Feb 2024 18:50:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Rve4ZXl/"; dkim-atps=neutral Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id CCD0E10E7A6 for ; Mon, 12 Feb 2024 18:50:02 +0000 (UTC) Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-5957ede4deaso2216057eaf.1 for ; Mon, 12 Feb 2024 10:50:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707763801; x=1708368601; 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=w8Muw6h1Q9P9TaGArYYX/lVFQTdPnjrlwu+lY7NfQMY=; b=Rve4ZXl/bJtGIMbYbIFFx2ELVGAjmuvw5NigeJHTs1FpYa6blJT9ONBhrM4zwZYfBs PPeqExKhY+6jK4/mJ7LHCYNgtqK1q1YyIzPW2zmqcDhWEKmOOpysYRmCSTGvCR/lGA0D Y9FoFzSqo5cBQMrwRvlKsGSMOkB27l8ydYVk+gpoDdJg1OoQF/Fsf/rGsdnkc8n6gpPt KT/3Y5p1tytsLp45J31DQV6+dmHrVrv4M7purrpds5EpNmDF8XsgyiZ7r9xUaOH5cHoG L9yZsYF4DhxBPrSUFdxjRuE0oCjJlcP4WmElce/yTcPZj3QdRpd/U9VIh1fRM5mejEco 1SMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707763801; x=1708368601; 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=w8Muw6h1Q9P9TaGArYYX/lVFQTdPnjrlwu+lY7NfQMY=; b=hbwS+R46jJnj0x2XC0ugbu77DNg7V5+SEh9iJciWaN1IhVEyP7i6ntGPCDlY9D5AMS i5O3/Y0pBxgPnhxpn4GH+Om4jqpnpf7ZRLKcVzbOEKCWKfCbKVO3FBDoCqH5k0Dw6OZs w6dDhje/lo2cm4ixDHlx9zc79MRvbhKQduH7P5c42BOjJG4Fqr843jBy8Z7WrvsQS2m5 9PoBPAUXTB2fcHb1jgV0SnRTqqrGgNIuXOakHLaOsXCIPJmr1/p6FBKhd8n3l+f01WT2 1HV0Smv7INHOkT+im9s7+xCOUqtbWouo15qiAaCqk5hDsRXTjLyPsqR0BGHeC48hkBEX cV1g== X-Forwarded-Encrypted: i=1; AJvYcCVUyE/c4SRhG2HDdo/orrU9xQ3AuOVqLv44+PJ6EW6vmpiBalPXrqB4DTjHxTFX41cvJJTLS3bcATKmgjkBhwUkv2aJ9s0m8FRFX5dPE6J6 X-Gm-Message-State: AOJu0YwibjwuLzmrocYNLXKQBipYNAJahpuy/JOTH2bZ1CG29Lio/mxN fA0qV1h4CV5wwL48mflWJvMw9Oyl0otqmezjMwEUdNbtkqXI5NGy X-Google-Smtp-Source: AGHT+IEyol+40Ytm7NwX5jgfgRdxMGoz711CEzuTbCrMDRmaGjM6JITqTjIMUT4sVuKU/aYQV+lhGA== X-Received: by 2002:a4a:3043:0:b0:59d:4eb1:1b7d with SMTP id z3-20020a4a3043000000b0059d4eb11b7dmr4373629ooz.6.1707763801581; Mon, 12 Feb 2024 10:50:01 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVCAHg8jjwVNnCn2wDfiU8wLFp8CZBjM/oUV2aG9tbS1Z6mEifTK/co8G7mdxU3NFTMxkVXlzUSDgCIg/le/ishPNtgv4QzxFsilMo0UQJvtCUbp23pd4Xzy9OlES50/DW9uJX0zL0V9gYl3338z3OdOftCK67W6XfsjBCu4XqsPNbHpvf7RS5ayEJ/ka46m0vYZRnIz9ID/osCSEb/g+0AS1Ro3Sj8DA+x73mFOgU3iAcSIkyI1Mkx/RCV1CZsO8KkVBQ8CBCQACkZokmU/v3nAcoqxzT2Se2p8l1Sjv3HVdX0OmiDNYcoBH+QJ2sdcyFaOWCoT47V/JHEfeUIitSxFEWAc4XPyExwiVMJcpZSxobhXmCUQjcbNETcAystZJuLVWUBhAeuFOt/gCx8DuWY+gXs9bSBoDpSGGYYvPT8ijidf0/IMUjkQ/IeBMiW1P0x62EY7g/r5WD+8C+AsVX2zlHBxkWYPpRrYFI51Ucdud93t3LGk0Th0nhnFus72/U/Cq0sB/n0cAexOUV1z5zDJYr/8yutqxNydGdobOpVKLI9S/sTSPqCmLjD Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id b7-20020a4a3407000000b0059d5360c62esm171939ooa.11.2024.02.12.10.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:50:01 -0800 (PST) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, quic_jesszhan@quicinc.com, neil.armstrong@linaro.org, megi@xff.cz, kernel@puri.sm, agx@sigxcpu.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 5/7] arm64: dts: rockchip: Update powkiddy rk2023 dtsi for RGB10MAX3 Date: Mon, 12 Feb 2024 12:49:48 -0600 Message-Id: <20240212184950.52210-6-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212184950.52210-1-macroalpha82@gmail.com> References: <20240212184950.52210-1-macroalpha82@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" From: Chris Morgan Move the vdd_cpu regulator to the device specific dts. This is in preparation of adding the Powkiddy RGB10MAX3 device, which uses a different vendor for the CPU regulator at a different i2c address. Also add an alias to the bluetooth device so that we can change the compatible string for the RGB10MAX3. This device uses the same pinouts but a different bluetooth device. Signed-off-by: Chris Morgan --- .../dts/rockchip/rk3566-powkiddy-rgb30.dts | 18 ++++++++++++++++++ .../dts/rockchip/rk3566-powkiddy-rk2023.dts | 18 ++++++++++++++++++ .../dts/rockchip/rk3566-powkiddy-rk2023.dtsi | 18 +----------------- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts index 0ac64f043b80..1f567a14ac84 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts @@ -37,3 +37,21 @@ mipi_in_panel: endpoint { }; }; }; + +&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; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts index ba32d0793dca..bc9933d9e262 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dts @@ -36,3 +36,21 @@ mipi_in_panel: endpoint { }; }; }; + +&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; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi index 0fa8f06f94cd..3ab751a01cb2 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi @@ -614,22 +614,6 @@ rk817_charger: charger { rockchip,sleep-filter-current-microamp = <100000>; }; }; - - 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; - }; - }; }; &i2c5 { @@ -805,7 +789,7 @@ &uart1 { uart-has-rtscts; status = "okay"; - bluetooth { + bluetooth: bluetooth { compatible = "realtek,rtl8821cs-bt", "realtek,rtl8723bs-bt"; device-wake-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>; enable-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>; From patchwork Mon Feb 12 18:49:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13553902 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 405EBC48297 for ; Mon, 12 Feb 2024 18:50:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FC8710E74F; Mon, 12 Feb 2024 18:50:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KlpIyrml"; dkim-atps=neutral Received: from mail-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id 18B3110E6A3 for ; Mon, 12 Feb 2024 18:50:03 +0000 (UTC) Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-59612e4a21eso1402614eaf.3 for ; Mon, 12 Feb 2024 10:50:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707763802; x=1708368602; 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=GAxk6zsY006+CdXJFHNEbBOsPg1Aj77aFmaDPPFfc8o=; b=KlpIyrmlcH1CONIeKcOXqNCDdA2FNxnELK0rxNL5uhUkRbm++n+QzK6tX5vfPcVPPc zELU5AtRpg4sRMIZelAYRikQ6SlcSVtUHdTgR0uuUoQ26Yr8lnaetL84Z7WbpHKMaGLr 1XZ9IbvznhxMBh8RkO4dDL0xMyJdudKREP7EPU2CMHAjXXkj59C+pwm6Z+txGXxK1zAM MMs/je43vVeIwyTidG1hoRCA9/kCm4Q9mT99SEY8TQBBjB/KNEgFZE3qGw61ByNp6s7m SJIMkZJaFiuWGqztdZZ1qU3mXzZvxDH5eFjDiNn6DlPTR2Cw0hy61UsFY8zo79Xm6U42 BJ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707763802; x=1708368602; 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=GAxk6zsY006+CdXJFHNEbBOsPg1Aj77aFmaDPPFfc8o=; b=DhGyYpbyBZOeIDJjMoGHleH/16HQMHUoS07gNwdSnHrvlqkK6T2fyCjiMuBSdFSSQW T5XQ/V+XB7jyvVgR44vHrQ3w+c5XrCZsKfi95sortr81whvqhHPxIsQ/T1tyD7sEubuW 971Ju2mwtBHicZNTLvTgCiwXccafzKt3KQicleBhACV+ZkaUx7TcWb2P9wQmbCgDp5Fs HKKWy+PYcg6tuxbF7aya/ikqe4C9N4PlIN2izopb3BmxwAq9At9vFAg7J8sQD7oXh0GF 72Dkfp4PQDT6p+DCVUqPDt6DIQqts2BSs7EA9DgItw++FwuVyYcfGxbNEQSVybwAMGxC N+AQ== X-Forwarded-Encrypted: i=1; AJvYcCXFTv5XZ7oKS+CauTl5XrrgNEwbYcoScm3lDmcTBwOKSaWaKIhs4+vGC6lF8sf/jQaOurw+dz2ditOBuZJ9AyUxPvsaVM1Nqn4SMWUjZaOW X-Gm-Message-State: AOJu0YwuIUO0FiHIzNjeGChiyGTKVG+8ofQUOzhhxM+19jIOasw7v3Ho 9T7c8YuB4TCYFYfz/x+LsQEuBquGbt/nCN8CEq44T+R8Lxv3VxwT X-Google-Smtp-Source: AGHT+IG4JPNFvgManuBh98r3P3BSUJPLxom8f7QyRDcXHUAlIIydohC2YLLtPabAms2kr1vtYZp36Q== X-Received: by 2002:a05:6820:c0f:b0:59d:4a67:cebc with SMTP id eh15-20020a0568200c0f00b0059d4a67cebcmr4021084oob.8.1707763802286; Mon, 12 Feb 2024 10:50:02 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXMe37f4x8CkBxc259TgyyFevQ4PbfKk2cgrpJtoMQJprs4FHbRuHdqk6qGveNFCAO7mz0AUXnTqouRTOea3ifPqPOxxpUmzXeaPH3jiPiyNJz1Mx8lH3KjypKRbfSPqGXLxVrp88B2i8rqXcuV8B1aMScc/mynw4vtGfEQHGom3QBgVcTOAgv8MOZkRwHJqrq+LrSdwgnwQOS6+NjK4Q9CF7JQRBoyH1uIADgcuDKqOFQbBgt2AFBCQtYxrlP2qdiUNQhmvtVmM8Ls9sNqplA+VFY2/Jr7lPDLRg0/j+yRbxIiQhrKlVqICWjYZtFch4oAzixg+8yDgSjJ0kxxqAZIsCCAXtcPUokAbrAiDLr88KJ5ezBmVCilzL/lvSeac36P39iKP1IPyKA2QPGxBn4bJEHZV/62IswtO6LBNTD1piuZKoc5WeIL0Vk/GR614iuwOAnvl5ctMVY21O0upAUut/kN/LGzLNlspsRGZIHTdc84elIkBZbrT9XRrxVqKHDgPVl/YGjeqeB2YzU+PQq9VjZf8jMal/HH52dngMfkUugHFBhCJdNTkGTu Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id b7-20020a4a3407000000b0059d5360c62esm171939ooa.11.2024.02.12.10.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:50:02 -0800 (PST) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, quic_jesszhan@quicinc.com, neil.armstrong@linaro.org, megi@xff.cz, kernel@puri.sm, agx@sigxcpu.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 6/7] dt-bindings: arm: rockchip: Add Powkiddy RGB10MAX3 Date: Mon, 12 Feb 2024 12:49:49 -0600 Message-Id: <20240212184950.52210-7-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212184950.52210-1-macroalpha82@gmail.com> References: <20240212184950.52210-1-macroalpha82@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" From: Chris Morgan The Powkiddy RGB10MAX3 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml index 5cf5cbef2cf5..4ab0b92cf241 100644 --- a/Documentation/devicetree/bindings/arm/rockchip.yaml +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml @@ -692,6 +692,7 @@ properties: - description: Powkiddy RK3566 Handheld Gaming Console items: - enum: + - powkiddy,rgb10max3 - powkiddy,rgb30 - powkiddy,rk2023 - powkiddy,x55 From patchwork Mon Feb 12 18:49:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13553903 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 3CFE2C48BC1 for ; Mon, 12 Feb 2024 18:50:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4ADCC10E7A6; Mon, 12 Feb 2024 18:50:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XYLxCIe4"; dkim-atps=neutral Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id BA13D10E7A6 for ; Mon, 12 Feb 2024 18:50:03 +0000 (UTC) Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-5961a2726aaso2303705eaf.0 for ; Mon, 12 Feb 2024 10:50:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707763803; x=1708368603; 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=U+Zsk6HBC5/Pag8q1TO8vPoQmQRPTUSpwHWT3Y8NpYM=; b=XYLxCIe4u+oxS97weZCW06VHO9Ln3SqFamCz/QZ3Y+Ai84S3m0Hlo8Z9R1Xi+tW+9D l+9Pw8U8UsAl9Xy1CMKGfnWq8EeXr9tfQVaUE8yzzNZ54dbRudBHci2MYqvA5gpZRxTd 4wIoSZM5rRglJLT+/6fllwqLeAXn0Lyzh4Q8z32oAXX1fDbVLgxAW94dqVIE0Xhsfyu1 Lg1iKfVk0r5U4VXxVgAt0BnqRGsKxOIvansH+8p4AJF9EMML1jSX3fh5oWxprHpMhIMM VbuZbOwBJPmY2GS0URmc3LM5zUUjFsnoGDqnHbQmt2gUFjybKyA+939II5hYeu8JM2+4 ZFQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707763803; x=1708368603; 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=U+Zsk6HBC5/Pag8q1TO8vPoQmQRPTUSpwHWT3Y8NpYM=; b=RYFn0yRNm5pdoyU6lbJcGe8b+msvrI0+dUX4e6XuEU+zPWDErFLMQCeGTD7mbewQyL gMoOrvZCEuUy1ecgiHNearHNH9lm7aOTqcA8XfeDfGoj8gSztaw1HRdpzBofFaOaY84v aioFg6ToIYGXNZ/0SqMxYvyN18hBD5i+EbE54I4J7zlvJ9tqARM8yq+lf93qMdtVAFRL sF2qAm9LHxGnDkhIIFTb9I/02qg6Q4dC9BsOiQkc1IEktVHBDA3nm1y4avxf9BXfv5zi qPj4zWfZ9BfVOdujhGfEZiaLlgVASv1kr57uqaTgCoWh7MPuB34WMUtURoGK78KjHHrN SvQA== X-Forwarded-Encrypted: i=1; AJvYcCWzZrbD9moUx9iA0xErzFGd2EAqe3uDrasTKjYvqYR0zudGaYeRnqjtSBCW2MS7JKXOJFkWvAbRDvVh0sqbSXfMDYn4/bByJ6y0d94EfEk+ X-Gm-Message-State: AOJu0Yw/QvGWI+O/ztgoXJHyjHWYHR2gMbBlwpgGMMFrzPTrwblcgERs qhftTe4kDcmwTcmtp5AHnQ3zy+QcL2fFcZpKis4M+2jY11IT39Rl X-Google-Smtp-Source: AGHT+IF2GtLHuizmdNtPctob4UCqvZ0KarbccbJZkSF7dyb21zuVDYoLXsv8+3H2OR5F+vrRXpMP7w== X-Received: by 2002:a4a:d283:0:b0:59a:e43f:f209 with SMTP id h3-20020a4ad283000000b0059ae43ff209mr5458362oos.9.1707763803015; Mon, 12 Feb 2024 10:50:03 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWkcxxpuI7IaKTDaMNEyKIuCQFx+EcAU6C17eWvs29APm+/yndvP422Msq0A74VjkoeOUbqBWNE9QDMySfBvBPprHJkR8bvckjfRer6slxaVMN2IxXpXtcV6oxy5Y1kAL68GdfuZDxJVgdJfwVGKE4zic9H54ehSUzDlgvCudEqpzWZof9uTI9gvZrTp8DZo62wVSLhhpFVGfPi0kpman5aMJGUaDjJl/v46z8VtFx1liYQwed3353f8eKYhP1Xh+vE/gDNqm4UesDeDJG33KPO+y06GUMlXg4R/Yh0PEXCgKGGuEuVHZ3LUYQqXvIU+Mv6zsF8jHJo+o417O8up4w5Na96uCLGx8uI0gpOc20mC8yQzw9nttZp4OeMM9IhBy4wZHUGhFqtgssenBcRs55QqN+6clXb0ky3xCDwBFQEwUnNyGxFGwjOC/dUsfan8hTSBb6MUhfkcleCXXedhD5Qu67T8Yup6DJtfn0CI6oCTx26Zvo8B/LipsDyCwA3HKh/Z5fFvL+6oskSZlUxcI7MvLula5K3D+Deco9EXJsk81i/E3Jq0X352tDZ Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id b7-20020a4a3407000000b0059d5360c62esm171939ooa.11.2024.02.12.10.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:50:02 -0800 (PST) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, quic_jesszhan@quicinc.com, neil.armstrong@linaro.org, megi@xff.cz, kernel@puri.sm, agx@sigxcpu.org, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH 7/7] arm64: dts: rockchip: Add Powkiddy RGB10MAX3 Date: Mon, 12 Feb 2024 12:49:50 -0600 Message-Id: <20240212184950.52210-8-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240212184950.52210-1-macroalpha82@gmail.com> References: <20240212184950.52210-1-macroalpha82@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" From: Chris Morgan Add support for the Powkiddy RGB10MAX3. The Powkiddy RGB10MAX3 is a handheld gaming device with a 720p 5.0 inch screen powered by the Rockchip RK3566 SoC. It includes a Realtek 8723ds WiFi/BT module, 2 ADC joysticks powered by a 4-way muxed ADC channel, and several GPIO face buttons. There are 2 SDMMC slots (sdmmc1 and sdmmc3), 3 pwm controlled LEDs, and the device includes 1GB of RAM. Signed-off-by: Chris Morgan --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../rockchip/rk3566-powkiddy-rgb10max3.dts | 87 +++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index a7b30e11beaf..3c4f87e4db61 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-rg353vs.dtb 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-rgb10max3.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rgb30.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-rk2023.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-powkiddy-x55.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts new file mode 100644 index 000000000000..fd1a01744a25 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb10max3.dts @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include +#include +#include +#include "rk3566-powkiddy-rk2023.dtsi" + +/ { + model = "Powkiddy RGB10MAX3"; + compatible = "powkiddy,rgb10max3", "rockchip,rk3566"; +}; + +&bluetooth { + compatible = "realtek,rtl8723ds-bt"; +}; + +&cru { + assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>, + <&pmucru PLL_PPLL>, <&cru PLL_VPLL>; + assigned-clock-rates = <32768>, <1200000000>, + <200000000>, <126400000>; +}; + +&dsi0 { + panel: panel@0 { + compatible = "powkiddy,rgb10max3-panel"; + reg = <0>; + backlight = <&backlight>; + iovcc-supply = <&vcc3v3_lcd0_n>; + pinctrl-0 = <&lcd_rst>; + pinctrl-names = "default"; + reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>; + rotation = <270>; + vcc-supply = <&vcc3v3_lcd0_n>; + + port { + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + }; +}; + +&green_led { + default-state = "on"; + function = LED_FUNCTION_POWER; +}; + +&i2c0 { + vdd_cpu: regulator@40 { + compatible = "fcs,fan53555"; + reg = <0x40>; + 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; + }; + }; +}; + +&leds { + amber_led: led-2 { + color = ; + function = LED_FUNCTION_CHARGING; + max-brightness = <255>; + pwms = <&pwm0 0 25000 0>; + }; +}; + +&pwm0 { + pinctrl-0 = <&pwm0m1_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&red_led { + default-state = "off"; + function = LED_FUNCTION_STATUS; +};