From patchwork Fri Oct 13 18:39:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 734736 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17AE01C290 for ; Fri, 13 Oct 2023 18:39:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UgxHg+hK" Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05BE8BB for ; Fri, 13 Oct 2023 11:39:27 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3af609c4dfeso1462948b6e.1 for ; Fri, 13 Oct 2023 11:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697222365; x=1697827165; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DL5nx56ml8EwdqvqmpvvdFpkJtuFtwq0M/Gm2EXLElQ=; b=UgxHg+hKRrqyhjEa8+tvWWY6S6tzB8dH9QGk2rSfKhdSTSwq1TfLUztqQAPhv0OJ9A XWPLxAh2fF/uFcncs/heTx2xutyNrrVK9ellDEVpkincB5l3VgloYbuCAjn8x/0WH20u ubEURj9oWcNnPhQNS4Tos/UQmTkcUMvAjKxrhP4cPr1nnSuQ15jJi2FMGyoc+zVN7UZ6 ThQV8WVLfiZOwMTnmFfUUxj6/bMIfQ+GLL5nZsHtZpbNPQcvHR/vBChTHqxdQxKX3Usv 7ldrK3qkwiWKSICYL0ZKJoypmmXebzpbcuRO8Xssr3pe+G/qcqMW7jbpgHm/lziqLzsq r41A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697222365; x=1697827165; 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=DL5nx56ml8EwdqvqmpvvdFpkJtuFtwq0M/Gm2EXLElQ=; b=MRXxbQhBfMbWdWgPLiyEyoOWaGrx4Fg3bDTujnGCsoLFe5rDuPuicV2427ZHWs6dCm bxZN3myLJZNettYdtJFd90bRnmJxs8exzW9fDvMYEln1c7vxghHmrfg9Qcye1XrJqrhU ZXP6MNKEOMC69C/dwQZuypXaDvyvgrvGjv4yDC7dOMRRm3ws1clJxPh4TRelD7pqQTEQ NTU/YYPpR+6pEUA+Kh7w/514cIcGMOPqBbtP++8780Twl/sz8vKD6S4N8/vBEpZyLJgl VSru4uOXEU99Hyzcjg7Tfupsc/tmF1Isri/3/cQrPBboKz33WrWaGxH/Nrf2t0nsw8pf nc5Q== X-Gm-Message-State: AOJu0YyYzH9nX0cuy8KeHaCbf0GWusW8WxbCyZUaMVGiFYnRsoCZMYNV qnoL+1E6z9FCTqm/XjPkvmg= X-Google-Smtp-Source: AGHT+IHAQ4slZoIai8CkCpzcohRVPtVa4yKRxIDPVGcNh8vLB3G0lzsMzhjH1ZSyUz9BdmXegQFNMg== X-Received: by 2002:a05:6808:1b0e:b0:3af:6cb9:ffc7 with SMTP id bx14-20020a0568081b0e00b003af6cb9ffc7mr36242744oib.16.1697222365565; Fri, 13 Oct 2023 11:39:25 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id bx19-20020a0568081b1300b003afe584ed4fsm842159oib.42.2023.10.13.11.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 11:39:25 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, andyshrk@163.com, jagan@edgeble.ai, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, megous@megous.com, 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/5] dt-bindings: vendor-prefixes: document Powkiddy Date: Fri, 13 Oct 2023 13:39:14 -0500 Message-Id: <20231013183918.225666-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013183918.225666-1-macroalpha82@gmail.com> References: <20231013183918.225666-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Chris Morgan Document Powkiddy (https://powkiddy.com/). Signed-off-by: Chris Morgan --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 573578db9509..25fd2dc378f5 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1081,6 +1081,8 @@ patternProperties: description: Powertip Tech. Corp. "^powervr,.*": description: PowerVR (deprecated, use img) + "^powkiddy,.*": + description: Powkiddy "^primux,.*": description: Primux Trading, S.L. "^probox2,.*": From patchwork Fri Oct 13 18:39:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 733437 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3265215E85 for ; Fri, 13 Oct 2023 18:39:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="URgC7WeT" Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27AACBE for ; Fri, 13 Oct 2023 11:39:27 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3b2b1ae4c21so500001b6e.0 for ; Fri, 13 Oct 2023 11:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697222366; x=1697827166; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F1wTDexLYvM5LHX90F6rxGOJ9LXZcSYzdsLh84YqciA=; b=URgC7WeT147tzGCKEL9N8nAJIQ3Fd7vLLOF5QE6lOtCMWmtAQXAlg91H5PNyCpx3aA DUh+eHTHMPXU+5mvLHCPnWheJBygbvTVeKUWTpM7HpyKaaVxK3rfdtKBFXdTNDYKL5SE e2po/LzxRdLERfr9MlRsjQq2D0k/UlYfJaZKef5ObtVo8Bvkf8iSngc/+3Dwref/olGh EiP8ZcfDLmIpKiXnfiZbLJn7NS94d0VzxMp1zAdbkqxsVww3BaHsF702sYcxiUZpxOCA ernEwAXy9Jgv5kS1TUmnMjXxJMe4pAleLOk4VSwpVLof5HTHfiaBbvxz6WcII5hi68vr vXYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697222366; x=1697827166; 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=F1wTDexLYvM5LHX90F6rxGOJ9LXZcSYzdsLh84YqciA=; b=W069bubi7xZ0obd0rDn/IbuV+OezSwW3t2Fv57BrQL/K/vpBoskm1Am4p8XOvdRWXq j94Vc6KRutIacptM/vLSyiRbUl45u+4sM7TmlDPaPwKJ95/UR5zV8BBwMGCnfksGx4f2 ZbkgK+6EEW2OPNbySTef6hNKcfeeBdn5MWFoctgeydBkOIZ74aaRGjRrNbFi1ZxrWQq/ lS3ESsGqzOfvgARTwhfxUbajvLpLl87EzD2KehmHZX+IbyQdkzo1uBvVh5DwQgTq4MwV b+HqYhWSe8RQWCxJ6/o6pkvRN5II1YWWfdcznVQx1RvbfZxMWuhoCzss7AznTS6XLtld h32g== X-Gm-Message-State: AOJu0Yy1d/9+4fD4JjM/XU7ENWVDsMpAs6InpijECarpcAkUkNpj52/7 zbTFoLilbwYImplHia1FVYk= X-Google-Smtp-Source: AGHT+IHdkztdQit8wuetjEnY18VnhEAH1GKxj23Osp/28dvXk64uW/pxMEBq7iAjlCbL8hSHMTdQhw== X-Received: by 2002:a05:6808:1994:b0:3a7:366f:3b01 with SMTP id bj20-20020a056808199400b003a7366f3b01mr37101888oib.33.1697222366461; Fri, 13 Oct 2023 11:39:26 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id bx19-20020a0568081b1300b003afe584ed4fsm842159oib.42.2023.10.13.11.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 11:39:26 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, andyshrk@163.com, jagan@edgeble.ai, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, megous@megous.com, 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/5] dt-bindings: panel: Add Powkiddy RGB30 panel compatible Date: Fri, 13 Oct 2023 13:39:15 -0500 Message-Id: <20231013183918.225666-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013183918.225666-1-macroalpha82@gmail.com> References: <20231013183918.225666-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Chris Morgan The Powkiddy RGB30 panel is a 4 inch 720x720 MIPI-DSI LCD panel. It appears to be based on the ST7703 LCD controller (this is assumed from the init sequence similarity between this and other displays). Powkiddy would not share the part number or name for the display from the bill of materials and there were no obvious external markings, so name the panel for the device (Powkiddy RGB30). 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 5ea74426b1d5..97cccd8a8479 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 RGB30 3.0" 720x720 TFT LCD panel + - powkiddy,rgb30-panel # Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel - rocktech,jh057n00900 # Xingbangda XBD599 5.99" 720x1440 TFT LCD panel From patchwork Fri Oct 13 18:39:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 734735 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62ED217980 for ; Fri, 13 Oct 2023 18:39:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UcLERC1U" Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6EF5C0 for ; Fri, 13 Oct 2023 11:39:27 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3b2b1b25547so507825b6e.3 for ; Fri, 13 Oct 2023 11:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697222367; x=1697827167; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XpG74RYAbsyeZPWO/cKaZxYQssK+OjpMXseuuKjO9Ig=; b=UcLERC1UBfED+giv6qjgjdkmO0gWBELqtpJXX75OYbfWrS8SExmJy+BwS7fHD0BdlA kX8VjDVAlrzINs8YWDAvHapeDy8915EBOcinzsd5Hr/z1Jb2Te8BBWRJuM2tNnRIIOwV GpdOPPMOjOgMngJ9vvDOzMQmKPXL5JELm+DX/opuFpZSTOsu8PBZlKSmg183poY25Fga sSihetDM6abCvOh3+bSlOJvH3HxTlAqvIA0py+qKFXYFzy8pxC1L7gB/gSQ6lXRBZg9D VbGkyXP8qpNy4cXURbHBgyIHDyMLF22mPfwVvD9W0iw+d54xS1mmNUkgJBxgtuQqPgTF YvHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697222367; x=1697827167; 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=XpG74RYAbsyeZPWO/cKaZxYQssK+OjpMXseuuKjO9Ig=; b=e1vPLeB0hq6TO9aJTI41VAu4ub4CZTXF9a7EgrzoMKmLm+R7Rf7scSKVDHkR3Qwf7v LULOWZbwvPIAl8XesKDYqZRacMgpbLDSIwuxzCwPvagYKdSzcXttu8FkS28MBUqEDfOf WnzFj2xakfNefTuujiu5E7+G2w7UHZs1kEgeZAn0Qsg5Wh+NlgziwjRE9b2HvF/O1KA9 2iH8MrKPiDbINWzEulckws45ONlUqgGAMUzzQmT+eNfT0Qj1ynWobe1HR0EAgnhDETZD +J6qEV10VydPx835+2lTH2zk6UZUMw06ouAYDJqlWDj8WUDTqWuDyIzdmfJq/79cLWup Kq3Q== X-Gm-Message-State: AOJu0YyD0Cl3Kzx4KZfeu9Gl/AmS2Obn+apAJEQq9E6FN4oUkDNx4fpR wgfsp6/V92Qi7e+0EILIcdE= X-Google-Smtp-Source: AGHT+IHCXxF7b1a3M3ZOkohw9lmflcVGCXq9oBMeHI9psiYwcW1lfGHZUQH76xDQHNnig2e2Hmhpxg== X-Received: by 2002:a05:6808:1823:b0:3ad:9540:5475 with SMTP id bh35-20020a056808182300b003ad95405475mr35536504oib.45.1697222367085; Fri, 13 Oct 2023 11:39:27 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id bx19-20020a0568081b1300b003afe584ed4fsm842159oib.42.2023.10.13.11.39.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 11:39:26 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, andyshrk@163.com, jagan@edgeble.ai, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, megous@megous.com, 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/5] drm/panel: st7703: Add Powkiddy RGB30 Panel Support Date: Fri, 13 Oct 2023 13:39:16 -0500 Message-Id: <20231013183918.225666-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013183918.225666-1-macroalpha82@gmail.com> References: <20231013183918.225666-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Chris Morgan The Powkiddy RGB30 4 inch panel is a 4 inch 720x720 DSI panel used in the Powkiddy RGB30 handheld gaming device. Add support for it. TODO: The panel seems to not resume properly from suspend. I've confirmed on the other ST7703 based devices it works correctly. Signed-off-by: Chris Morgan --- drivers/gpu/drm/panel/panel-sitronix-st7703.c | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index 6a3945639535..a9892a4447fb 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -433,6 +433,94 @@ static const struct st7703_panel_desc rg353v2_desc = { .init_sequence = rg353v2_init_sequence, }; +static int rgb30panel_init_sequence(struct st7703 *ctx) +{ + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); + + /* Init sequence extracted from Powkiddy RGB30 BSP kernel. */ + + /* + * For some reason this specific panel must be taken out of sleep + * before the full init sequence, or else it will not display. + */ + mipi_dsi_dcs_exit_sleep_mode(dsi); + msleep(250); + + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xf1, 0x12, 0x83); + 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_SETPOWER_EXT, 0x25, 0x22, 0xf0, + 0x63); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00); + 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_SETSCR, 0x73, 0x73, 0x50, 0x50, + 0x00, 0x00, 0x12, 0x70, 0x00); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x46); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0b); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0x3c, 0x12, 0x30); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, 0x07, 0x07, 0x0b, 0x0b, + 0x03, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, + 0xc0, 0x10); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, 0x36, 0x00, 0x32, + 0x32, 0x77, 0xf1, 0xcc, 0xcc, 0x77, 0x77, 0x33, + 0x33); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x88, 0x88); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, 0xc8, 0x10, 0x0a, 0x10, + 0x0f, 0xa1, 0x80, 0x12, 0x31, 0x23, 0x47, 0x86, + 0xa1, 0x80, 0x47, 0x08, 0x00, 0x00, 0x0d, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, + 0x48, 0x02, 0x8b, 0xaf, 0x46, 0x02, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x48, 0x13, 0x8b, 0xaf, 0x57, + 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, 0x96, 0x12, 0x01, 0x01, + 0x01, 0x78, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x4f, 0x31, 0x8b, 0xa8, 0x31, 0x75, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x4f, 0x20, 0x8b, 0xa8, 0x20, + 0x64, 0x88, 0x88, 0x88, 0x88, 0x88, 0x23, 0x00, + 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0xa1, 0x80, 0x00, 0x00, 0x00, + 0x00); + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, 0x00, 0x0a, 0x0f, + 0x29, 0x3b, 0x3f, 0x42, 0x39, 0x06, 0x0d, 0x10, + 0x13, 0x15, 0x14, 0x15, 0x10, 0x17, 0x00, 0x0a, + 0x0f, 0x29, 0x3b, 0x3f, 0x42, 0x39, 0x06, 0x0d, + 0x10, 0x13, 0x15, 0x14, 0x15, 0x10, 0x17); + + return 0; +} + +static const struct drm_display_mode rgb30panel_mode = { + .hdisplay = 720, + .hsync_start = 720 + 45, + .hsync_end = 720 + 45 + 4, + .htotal = 720 + 45 + 4 + 45, + .vdisplay = 720, + .vsync_start = 720 + 15, + .vsync_end = 720 + 15 + 3, + .vtotal = 720 + 15 + 3 + 11, + .clock = 36570, + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, + .width_mm = 76, + .height_mm = 76, +}; + +static const struct st7703_panel_desc rgb30panel_desc = { + .mode = &rgb30panel_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 = rgb30panel_init_sequence, +}; + static int st7703_enable(struct drm_panel *panel) { struct st7703 *ctx = panel_to_st7703(panel); @@ -694,6 +782,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,rgb30-panel", .data = &rgb30panel_desc }, { .compatible = "rocktech,jh057n00900", .data = &jh057n00900_panel_desc }, { .compatible = "xingbangda,xbd599", .data = &xbd599_desc }, { /* sentinel */ } From patchwork Fri Oct 13 18:39:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 733436 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 088A11B296 for ; Fri, 13 Oct 2023 18:39:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SfnuHlAV" Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8308ECC for ; Fri, 13 Oct 2023 11:39:28 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3af6cd01323so1426755b6e.3 for ; Fri, 13 Oct 2023 11:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697222368; x=1697827168; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GXvtOEtJnfXimkkSuTA6yQu+NLR704L5IFi4fq/Sctw=; b=SfnuHlAVDyfnRYDJAQaSwIEc/5wSuqICpJVg/DtkZDH2iSP+VJDx2VFS4duoWCA6Bv wezUYYyroy+huEGIfLS9KobRazpAxAN88EXhSVgBcayieROffWcoYdwUyBqSugT/56lD s9+9LJUm/sH+V62+Quae9ADf8h3K+xpw4IOWiE2Ma6iILUD+Sa7IXydUBVCvjtGXF0LY phf4pIY+TSCvOTjybRy8e3uCtDDDKaHEbR1z6GkeidtV5kscDp4y4FV+1G1submUP8nx r8JmeUTjNBT+xQL8JkSMRrKMd15Of2McOO8CgKuY+TqwNoctr5w2IT60R2xNOJO2EbBa ZpgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697222368; x=1697827168; 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=GXvtOEtJnfXimkkSuTA6yQu+NLR704L5IFi4fq/Sctw=; b=WTzzX3nxRHrGYXhvbBTtcUd7Vk+k+xSdA3Fv264Kw0Fglo1rb9do32Tq/7oUWFMHYR rAJc5YXQ1FxT3HDWzVx6dSnrAaBAF+QQHFe4bzg1gcVpFGUDGgu4Xsxv9zoMxxzbKpkN prI9h84i8lUleWyc8I31yLqpPPArQTJp1D5SvVWJM1By5J5BzgC8hmrJvxoN4MkQHu4U qbNS67kNDIG0pWrFtCfKsggRFK7PZZO5hyZNX10FWMzOf0sb62eMXuJQZX5cqpkenbTd wTpsBKZZ7yTb0M4Wzw26JmS7RmLGGtpT2o0Wj4+FdClU7LFFlsULiGjclZdmOA6cWGDv HKeA== X-Gm-Message-State: AOJu0YyhcPaaCFG8lpe35gHF7EG5H0qqQFAPhzbebPNFV7F7RqXLfExl uCEI+oiMB0q7mfJQ78eNHTQ= X-Google-Smtp-Source: AGHT+IHLCQbzkeoiVhX2wJ/317UY9cBFnl7g/HRg+swF0MvMpIM8vSagJfZ0IQEo3cfxpthCYJQz7g== X-Received: by 2002:a05:6808:10ce:b0:3af:66ef:3566 with SMTP id s14-20020a05680810ce00b003af66ef3566mr37525952ois.33.1697222367844; Fri, 13 Oct 2023 11:39:27 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id bx19-20020a0568081b1300b003afe584ed4fsm842159oib.42.2023.10.13.11.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 11:39:27 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, andyshrk@163.com, jagan@edgeble.ai, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, megous@megous.com, 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/5] dt-bindings: arm64: rockchip: add Powkiddy RGB30 Date: Fri, 13 Oct 2023 13:39:17 -0500 Message-Id: <20231013183918.225666-5-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013183918.225666-1-macroalpha82@gmail.com> References: <20231013183918.225666-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Chris Morgan The Powkiddy RGB30 is a portable handheld console from Powkiddy which uses 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 ca5389862887..a349bf4da6bc 100644 --- a/Documentation/devicetree/bindings/arm/rockchip.yaml +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml @@ -669,6 +669,11 @@ properties: - const: pine64,soquartz - const: rockchip,rk3566 + - description: Powkiddy RGB30 + items: + - const: powkiddy,rgb30 + - const: rockchip,rk3566 + - description: Radxa Compute Module 3(CM3) items: - enum: From patchwork Fri Oct 13 18:39:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 734734 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44B691C298 for ; Fri, 13 Oct 2023 18:39:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fNqy2zLb" Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 500D583 for ; Fri, 13 Oct 2023 11:39:29 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id 5614622812f47-3b2b1af09c5so497306b6e.0 for ; Fri, 13 Oct 2023 11:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697222368; x=1697827168; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=taQ7vAEpEsyYFLFUuiwGBIsz4PkgF1SnWSyqumrI0Hg=; b=fNqy2zLbtD2s/YfTmvq+s7b07OeGTEc0CrZCE7Pmcy5LAMUIF0QtwVVmvjgc/g7Qh8 kIXxMZEmScdk4C7xoftMMqFA3pKnsSfnqqbbdDqskrGsC0nBZHIPQiTsqKItl6dodD4M pvLyh+55ZY+r9G9s2nHmufSpKa4b1SQuVg/aBiUXUbByGDyY/Z18e/+PUOk+UCqDdwyI aoV60xyBSDtOzRipqrtz8pVQdR00s7vpAuyfkS8ozD4sbB5V7aoSnQCUtoaI5T1KK3YL HsM+AhlKYZlylP/DIF8VDx977hDI9HxEnEen9OlY1lO5FQGkk4yMUqz+UYTzAPcHW5Tq mqyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697222368; x=1697827168; 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=taQ7vAEpEsyYFLFUuiwGBIsz4PkgF1SnWSyqumrI0Hg=; b=Yyhd8HtJlo05R/WBfDn96tF+dxIPLL0/qiUmr0PHmjz8wTWWr3fzcbiOi4PY7c5kkM KafPgBqvv9KlU38kEn3I4Muv9Go2UZzbFkhiCBT43rC0/VWl6KuZNoiK9LAHvQ+vEfRX BbipABaB4cQLdLK0Wo/mE+yhdILPydlJKZdpU2bNqmNZGKhsHzU7vGth4vtHjsD32OYE CgJJEWsLLCVxSLsG8cwTFGfyxCeJbicKgk+PpBeD35ZPPKqWvm2y3rClhiQ6hEqcws/c fy+ndJuXrA0oKAe78SbQuv+so52lpPCEN5Xs9aU+/RpEUIHjW2Mytcg1I1GagEboazl2 /dkA== X-Gm-Message-State: AOJu0YwNObOfFIIDrLfmQX233eJIMMu1RzUsAUD8kSX0PgATKkUfWKGY 0v/EJJVsJaG5Q2gi2/wuTpM= X-Google-Smtp-Source: AGHT+IEOHRMzzwdVAGQ57P+LsaY7TAEk+aijWm2eVqpD+nW1THPcnfl7PoK9r88Yvpx6L8xVpVn8yg== X-Received: by 2002:aca:220e:0:b0:3af:26e3:92e with SMTP id b14-20020aca220e000000b003af26e3092emr23790520oic.28.1697222368552; Fri, 13 Oct 2023 11:39:28 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id bx19-20020a0568081b1300b003afe584ed4fsm842159oib.42.2023.10.13.11.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 11:39:28 -0700 (PDT) From: Chris Morgan To: linux-rockchip@lists.infradead.org Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, sebastian.reichel@collabora.com, andyshrk@163.com, jagan@edgeble.ai, daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org, neil.armstrong@linaro.org, megous@megous.com, 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/5] arm64: dts: rockchip: add support for Powkiddy RGB30 Date: Fri, 13 Oct 2023 13:39:18 -0500 Message-Id: <20231013183918.225666-6-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013183918.225666-1-macroalpha82@gmail.com> References: <20231013183918.225666-1-macroalpha82@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net From: Chris Morgan The Powkiddy RGB30 is a portable game device based on the Rockchip RK3566 SoC. It has GPIO buttons on the face and sides for input, stereo speakers, a 720x720 4 inch DSI display, a USB-C host port and a USB-C peripheral port, dual SD card slots, WiFi, Bluetooth, and 1GB of RAM. Working/Tested: - SDMMC - UART (for debugging) - Buttons - Charging/battery/PMIC - Speaker/Headphones - USB - WiFi - Bluetooth - Display (at 59.04hz) Not Working/TODO: - Display does not resume from suspend properly. I'm working with the manufacturer to resolve this. Signed-off-by: Chris Morgan --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3566-powkiddy-rgb30.dts | 152 ++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index e7728007fd1b..3f01b429a3aa 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -77,6 +77,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-rgb30.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-rgb30.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts new file mode 100644 index 000000000000..c7828c99a1bb --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rgb30.dts @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/dts-v1/; + +#include +#include +#include +#include "rk3566-anbernic-rg353x.dtsi" + +/ { + model = "RGB30"; + compatible = "powkiddy,rgb30", "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 speakers. Headphones automatically switch via hardware when + * detected with no ability to control output in software. Headphones appear to be mono + * (each output channel receives all audio). No microphone support on 3.5mm jack. + */ + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "rk817_ext"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,widgets = + "Headphone", "Headphones"; + simple-audio-card,routing = + "Headphones", "HPOL", + "Headphones", "HPOR"; + + simple-audio-card,codec { + sound-dai = <&rk817>; + }; + + simple-audio-card,cpu { + sound-dai = <&i2s1_8ch>; + }; + }; +}; + +/delete-node/ &adc_keys; + +&cru { + assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>, + <&pmucru PLL_PPLL>, <&cru PLL_VPLL>; + assigned-clock-rates = <32768>, <1200000000>, + <200000000>, <108000000>; +}; + +&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 red LEDs instead of an amber and a red. Relabel LEDs as + * red_led0 and red_led1. + */ +/delete-node/ &{/pwm-leds/led-1}; +/delete-node/ &{/pwm-leds/led-2}; + +&leds { + red_led0: led-1 { + color = ; + function = LED_FUNCTION_CHARGING; + max-brightness = <255>; + pwms = <&pwm7 0 25000 0>; + }; + + red_led1: led-2 { + color = ; + default-state = "off"; + function = LED_FUNCTION_STATUS; + max-brightness = <255>; + pwms = <&pwm0 0 25000 0>; + }; +}; + +&panel { + compatible = "powkiddy,rgb30-panel"; + vcc-supply = <&vcc3v3_lcd0_n>; + iovcc-supply = <&vcc3v3_lcd0_n>; + /delete-property/ vdd-supply; +}; + +&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>; + }; +}; + +/delete-node/ &vibrator;