From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD141C7EE22 for ; Mon, 15 May 2023 16:00:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 10799865E6; Mon, 15 May 2023 18:00:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S1f/eeUi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D687865E0; Mon, 15 May 2023 18:00:42 +0200 (CEST) Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6FB6780EFA for ; Mon, 15 May 2023 18:00:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-559eae63801so191740287b3.2 for ; Mon, 15 May 2023 09:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684166438; x=1686758438; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=a3Y76fO6P2iKySczFlDqMgOEH11saybnat6QiGBV/Uk=; b=S1f/eeUi53P35Z0wxIpcgqEDPt5ZS5PAiMZDnU+xJF1L+bi2WwNhaeSVmHc51uRJ0t GplIJFZ2/hm4MJD8DUpn88IieiHZFGJDWyEPA4Aill5PzfEJXdSFouloOk0ms4H2Wk/U 7B2LCmR6NdlL5JvoCqoXFEcB2qsR7sXAiVnFjq8yPVUKhOGVI1jT3SWBXpoqg53+U2S+ iDTr8+adyaN+tA9ubIWPtLJCRPpkhwSk69jXV1L8yAD6gMZTbnlk9nuHYa+lwO/kv/kB bWB6QegcbdYE6Cao6NFQry9/qQdPQXe9AZnV2IP4xvtoMN8MQVp098WZ2UZ4S75BFTLg g62w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684166438; x=1686758438; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=a3Y76fO6P2iKySczFlDqMgOEH11saybnat6QiGBV/Uk=; b=YjJrkRzk2h+pkeaZguX/ddm7/ypHYkEKcURR4zS2gY4eZ46tLeX876B6GooQxppkDT BQ3kgTWrPVbFV54DC9lipbpbvO2tFF1hPQOiOjxQCSdOXo1Y94eyANtYly7BvDeOZt8M 3maMhxKAYBDH2hPwO+BPbsGvcNxf37rPpNeoznwn8EpqVfARPLN79z5YOpB3QnPiZQlX RUq0bbOxD/sKt2+SNfLrCpLB1GNagITqpfMoE9KAXIKhasEEgynuposmFQAfCQFEKEiO sReDeBNrdudTpn3S61kP+bSsRkC+blqzawSWVlL+V2NrmTomEpEVP1Jzl62pe7bajkxD wOkQ== X-Gm-Message-State: AC+VfDyHCXXm6UfS0Yzv246tPdQ9Q0R8Pt2b4an38FjBV+UvC0IaCAlh 0hNUEweXZkvj+kGrB7psgkBXAQLRcmg29w== X-Google-Smtp-Source: ACHHUZ4onKM1tdnAd4woZ1j+1rqU3fY6NJhHMXk4/FCaMjaJqf+bv9jO/TWwAf6zs8aSnhOWkL31Fw== X-Received: by 2002:a81:4802:0:b0:55a:7c7:6ff7 with SMTP id v2-20020a814802000000b0055a07c76ff7mr34270766ywa.11.1684166437837; Mon, 15 May 2023 09:00:37 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id m8-20020a817108000000b0055a2cda24acsm43909ywc.35.2023.05.15.09.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 09:00:37 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: kever.yang@rock-chips.com, philipp.tomsich@vrull.eu, sjg@chromium.org, Chris Morgan Subject: [PATCH V2 0/6] Add Support for RG353PS and Panel Auto Detection Date: Mon, 15 May 2023 11:00:26 -0500 Message-Id: <20230515160032.126742-1-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Chris Morgan Add support for panel auto detection for the Anbernic RGxx3 series. This requires us to probe the DSI and DSI-DPHY controllers so that we may send a MIPI_DCS_GET_DISPLAY_ID command to the panel to find out which panel we are running. This requires creating a kind of "skeleton" driver for the panel so we have just enough information about it to issue the necessary command. Once the panel type is determined the panel type is saved as an environment variable, and additionally the panel compatible string is automatically fixed-up in the devicetree if it is found to be incompatible. There is a table of panel IDs and compatible strings, support for a new panel only requires knowing the ID and the string. Additionally, the device auto detection was changed so that it mimicks the panel auto detection, requiring only defining a few new values to add support for a new compatible board. This is done while also adding a new board, the RG353PS. Tested the auto detection on an RG353P, RG353PS (2nd revision panel), RG353V, RG353V (2nd revision panel), RG353M, and RG503. As long as the correct devicetrees were located in ${boot}/rockchip/. U-Boot was able to automatically detect the correct board and panel and boot each device correctly. Changes since V1: - Split into multiple patches to make it easier to digest. - Updated documentation to note panel detection is now working. Chris Morgan (6): board: rockchip: Correct i2c2 pinctrl for RGxx3 board: rockchip: add DSI and DSI-DPHY for Anbernic RGxx3 board: rockchip: Add support for RG353PS to RGxx3 board: rockchip: Add panel auto-detection for Anbernic RGxx3 configs: Update anbernic-rgxx3_defconfig for panel detection doc: anbernic: Update RGxx3 Docs for panel detection .../arm/dts/rk3566-anbernic-rgxx3-u-boot.dtsi | 10 + board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c | 322 +++++++++++++++--- configs/anbernic-rgxx3_defconfig | 15 + doc/board/anbernic/rgxx3.rst | 31 +- 4 files changed, 327 insertions(+), 51 deletions(-) -- 2.34.1