From patchwork Sat Feb 3 16:52:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544304 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 4438FC48291 for ; Sat, 3 Feb 2024 16:53:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B542E10E840; Sat, 3 Feb 2024 16:53:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jLRIWlg9"; dkim-atps=neutral Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8119F10E840 for ; Sat, 3 Feb 2024 16:53:36 +0000 (UTC) Received: by mail-io1-f45.google.com with SMTP id ca18e2360f4ac-7baa8097064so184916139f.3 for ; Sat, 03 Feb 2024 08:53:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979216; x=1707584016; 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=DkvYfuuKpH2RXM+gZl2DrO4caEYcPakC9a9yPqGZtlw=; b=jLRIWlg9skXTjwLS4S/JS0A9+NesoHgJ7OirtK6fdhVgY+lCHCPFRx/mNoODkyOr/N p/HB6b42jTGB3vn46Kbk0HR3us7mGPV8O01E/ulyXJ1Ulu5EcCTnVMI4EZybO9TyvUL5 hpzcWG9ACY0nTKMGfPnmFNqP8xC44EeSniF5VLw/gfdQ1o5HZR4H8Dplxkxwiarr4CXi 05WVKi+jjHsyIi8l4qzz6k4NHFeGMiXynKJP2PgxfQlDKgbJPiNUXETgri0tqjtT8NJ4 AyV55akJmKu/n5fbtdF4YnTwzNY7hdk81hoFKGScI8TZsJKWW2XS7x2pxal/zdAC9xYy UvGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979216; x=1707584016; 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=DkvYfuuKpH2RXM+gZl2DrO4caEYcPakC9a9yPqGZtlw=; b=Uwu4yIGPRciMwKkWXMy8b4ooDLBobzVdnFAH70F7WSue+2t5EX/d4XeVEu7R3XwnXA ElX2jn6rZ0j6iwsi6qFAYraNdHhR3HYToTIMpgghpzlP14WxoI1QSXGRfNFPsVvI0EB/ dhoLDXGlghMOnS3uvMUMN/podAn+4h6mjUrt9jeeNrksoKSCz9KOXCoA97w6cWxWyK9A 05yYK61Rtpn5u+PV6Ef7xjcepyNpsxMi8648Sa5UqtHuJn8h9oahwYQReYdxJVT0hhqB ouNYqgJC0FShApXBuz90ZODnZC4o9AK1GK7vLaHeMw/dfByLRh3Mfafk1uhxFa/gya1+ MdKA== X-Gm-Message-State: AOJu0YwhIE24GHBr33asosyB0ek9KYER3/14molEhb/5iz+XEy7nQIIb TCMGIDdX0d7F9BxucYTpOEgGeAd36BErBx+v9jnWPRqkF/9QAPNT X-Google-Smtp-Source: AGHT+IEnlehfxC3EzWtYjfCC3lg1i9dFNOJn0VmenuEK/v0vuI8ECXoRZdHOVhb90XAj8e9K5eLOTA== X-Received: by 2002:a05:6602:122e:b0:7c2:c868:d864 with SMTP id z14-20020a056602122e00b007c2c868d864mr3311227iot.10.1706979215630; Sat, 03 Feb 2024 08:53:35 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVjSq9uyvcTPIb1quTtFSupfo+AL7NwJHi6Gu9nFWWPsmK3n0IEtNuMcvPWgzs9ROEuzmDK7+Wupt2U4qGGShNuzx2ikrWYvZJ/eLQgqMNjsPAmbBFMoOlIfiUgvt9rDcSf90uM05CbsK7HmPlbjA4HdOvDHgzozVjMJ4nYwd3PIt7kwXGtQX+NC0ehIFWD/Iqc3ihmxr3qjqO0ux70S7eSaXSAudI43x6cWqJTIpY9O7Z0EJAQBAerJvvb63N4nuYp0CDntCNnt9jv5xL8UiE2YnKrLFgPQWmetCSi3NNhyIXe3NjiYKKKQjVdr/L6ApH0/1upjtGlWPICCQGcbX+MsVUVWD+10W428nzxIH+5dSaEUNKgA2UXG5O+3x8BPM42Lk1nw6769jHifqDAbmh8oYgREXJt43SEtWs0Q2Kw+8fa29c5MY4eUANjOM2LEd29krLgsvnzynjeAcWOgT2StD4fdgMHOHikKBm0upJuFRx6E24nV2rMqvEYYXlvVptT1CRz0FQaq3BXGZ2/+tYak8y962zSr0Z97YrKXI65juREBPHm/SogAU7MW2Vmz8Bug/jcPZt1ycppSiD3Y3CyVrF9zGlf3Ym+b7QEVGQVh43eY119Xx42CFZZjbRmMfdnRHG7LBZF0uGpH3ekeVHTbnVURFewtaY8GnQvpu/5v7C7deIBXMNhFN4aYbmBMWPdE7xaGuzpxOx85u4690rcnBzSOP37lsU/rU26nkQFukAKLzdkSNZCuiNoN55jijF5Q0zBbV6q5CMc2GY8g3jy0gMHsI2IHqeG+o/JM3vWdqh2gpJDd7rE7ckT5vg27ALY/Y2rER5Tbsanb4jlygSWOkMuURwUEdv0oecCQ2UxmAtpFh68Dr5hso0K9/yy7hag2o9VcCLmnHXBC2VVS4vSWHddjoSYUei0RdcQJO7eNCotvGJXUrv9rha08zAHKY94An d4r+OPZZMUhxaoi6lIu2Mv8TVSA6zWR4R7R+d4rA+c/RakQwPr38lbHRVnrC3W7wuFaXfGqiZswJWCs9+HeFccxOyl7VxYNRbbmce3Dyn+5gm+OpGoD+yu7xaaUBGZSoE2L3R/KWDDKIRnq98KiwcqGM1DcpLSTdJq1lC7Ni01p+sRk70WhetbCqzNgP6N/NWFDqhP2I0RhVgFQAw47O++snhkvHAL9d1il3HDdBnzucrXNqTLTuqp8gBJKqbZXj7hqlNYjBjc Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:53:32 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Lucas Stach , Adam Ford , Krzysztof Kozlowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 01/12] dt-bindings: phy: add binding for the i.MX8MP HDMI PHY Date: Sat, 3 Feb 2024 10:52:41 -0600 Message-ID: <20240203165307.7806-2-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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: Lucas Stach Add a DT binding for the HDMI PHY found on the i.MX8MP SoC. Signed-off-by: Lucas Stach Signed-off-by: Adam Ford Reviewed-by: Krzysztof Kozlowski Reviewed-by: Luca Ceresoli --- V3: Removed mintems at the request of Krzysztof and add his reviewed-by V2: I tried to help move this along, so I took Lucas' patch and attempted to apply fixes based on feedback. I don't have all the history, so apologies for that. Added phy-cells to the required list and fixed an error due to the word 'binding' being in the title. --- .../bindings/phy/fsl,imx8mp-hdmi-phy.yaml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/fsl,imx8mp-hdmi-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mp-hdmi-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mp-hdmi-phy.yaml new file mode 100644 index 000000000000..c43e86a8c2e0 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mp-hdmi-phy.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/fsl,imx8mp-hdmi-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8MP HDMI PHY + +maintainers: + - Lucas Stach + +properties: + compatible: + enum: + - fsl,imx8mp-hdmi-phy + + reg: + maxItems: 1 + + "#clock-cells": + const: 0 + + clocks: + maxItems: 2 + + clock-names: + items: + - const: apb + - const: ref + + "#phy-cells": + const: 0 + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - "#clock-cells" + - clocks + - clock-names + - "#phy-cells" + - power-domains + +additionalProperties: false + +examples: + - | + #include + #include + + phy@32fdff00 { + compatible = "fsl,imx8mp-hdmi-phy"; + reg = <0x32fdff00 0x100>; + clocks = <&clk IMX8MP_CLK_HDMI_APB>, + <&clk IMX8MP_CLK_HDMI_24M>; + clock-names = "apb", "ref"; + power-domains = <&hdmi_blk_ctrl IMX8MP_HDMIBLK_PD_HDMI_TX_PHY>; + #clock-cells = <0>; + #phy-cells = <0>; + }; From patchwork Sat Feb 3 16:52:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544306 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 E9F86C4828D for ; Sat, 3 Feb 2024 16:53:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1B4510E948; Sat, 3 Feb 2024 16:53:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YD0KTlWq"; dkim-atps=neutral Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E97810E948 for ; Sat, 3 Feb 2024 16:53:43 +0000 (UTC) Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7beda2e6794so63311439f.1 for ; Sat, 03 Feb 2024 08:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979223; x=1707584023; 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=sTt4IustaYWqtf43/+p8t7gMS/7f10DukH4cFzdIOfE=; b=YD0KTlWqr0iJMH9W6RE23c9UAcDCLGNLUF8D9EXChocEHFQbL2Pb9QauuAzJPbwO6Z TsUVGwGyCK5Lta1b+REGb0g03EeC4QBeuH6NwvqQbqyslgjHo5FjtvfdBxCT746GRM4X xU/JBsH8SHSas+8B3xn+Yi23ADRZs+OrTsi8OxT3t3WdcXr/6S4tmp9X1yctcTovvU7m TtdAG8aQkKLbPWsqY7Ycl4pjyWubMK9JttUsSDqi0Lik7NGo+9cXDck/F6i4v+F2QR2D XNAovoeMlgo45s+PjA6eF87b45aaBm0ylsDqL86bLWJXgRgXCm1maYIY30EWjytTFCm8 nL7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979223; x=1707584023; 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=sTt4IustaYWqtf43/+p8t7gMS/7f10DukH4cFzdIOfE=; b=Td2F4e/Q4IvvdBuVW2JnRmAaaoJUDoHWnG2plahqbTV2vlMCYmUltNZ1P9gdw+WJKu /igO/Lo0M/Uzny+7T1vyP0U101N11UZelYrO0mvRy9R7fT0OfkLrMXlEQXf/2ALA1pee l1FD5OBHGaFjVGsuwGA8DRjoyp7rQv9EL4Eh3w3m/DNhmDq/sUahdiaoWxuiAXzNWtP2 NUd2nDZAGq+Og/v/sdS8tKU3FuR+4z0Tijysek8VR8Zk3KbOAPKpZhp18NGru406aozh AqUceHZAHidTXtkQ/2fjYcIt3FVOBLke9iy80p8m+Z7ZF6V5ZU1qJgZG5ZM2wT+AXbyp KC/g== X-Gm-Message-State: AOJu0YwbUFa0VEXIp9YBh1L5dWB0H8DU+OK8+CQBcDgyR8NP/k1yg5d5 1bsZkxPuNy4n5znjxaTmqZryEinDzuIt5T21zGjM2imA5ke8nJGAAhYAXq7wu9E= X-Google-Smtp-Source: AGHT+IFvhKxt0CvbPbeCyayeiqeoN7ivfYW0lQPAhxgIXd/7DwUnz8D5+wGaqNOEMPj5OaacQ6jR0g== X-Received: by 2002:a05:6602:1549:b0:7c0:3d0f:b7cf with SMTP id h9-20020a056602154900b007c03d0fb7cfmr1459386iow.8.1706979222475; Sat, 03 Feb 2024 08:53:42 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXKufmlinHDuxRoWwZ8laTspUhQscwgvcjE5WqzVcaL+HG8o+QTOZekKNUncYftgZYRsS26IMoJJlEtJlbKJ9usp1Rnw2LKqBrU1fz8S3kisR4l8vxGo1Dj1LRaeqBtfch+2/TvaWmYXwSPxykgTayaloVlrpRLN40wmoCjPNpc7+0AiQ0CLMuflwNRZ8+PLQaG+UJT/ICfCXWbd0Xjf9zJLl1C4HH49JNs76dHIE8aznpfSq0MkniUNTdXODmE8pyo5Oe3S0n+jil2E50EBK2iwwPVY8Ma6imDEnPWCOuK1Z9QD7fwODW/CwAQZvP6iTGQ8qeVn1Gebsj2Ya2Umjzta/r2V9PN9VZnGtWqn7PmrFImaK28r2jRxixjOjzXem42TqkDWfe0Fm9olG0SHaNmO4r5N1iZ4EdrWasqjIDGLWYf13JeSSeJa85FGiP1GnPNz4mxg+k9Quehg6g+wEicL3Ja8oKtIbAAhdlcyzMqqza+cCX39dc7X7QVpLmsHFP5+yaCgeQXER5JJ95zpewOYeOttWUYJwCZqkXpEs/1KtBX4KGDGuJAGqkOtNj8aaiRImk3ezdD3P1g2USQQwyLMNxDWSqJ8YiTKf/pQvI1JGQDBc+ZMKQJYiLUrmiIuJ9K4CYvdSMbVygPqeBJKB44GHtg8/dX2FJBE5WiBuJNcMvTiGy0VOpFy6XrgxlnGR/wsRz5VJCddYYwZw2L87Oome6jyA2EQYOX22RmQSIHuRINW3n3SpboXwgzhT6kTFnhOvKki+3nBGR87hNRcsyxqFmhJZ7EO1gRcVB8ZbCAn7W/SE3838nKhxJUCxMTq7bu4DqpA4sPqr5AsIdMxHOZNvb46snKyozFivPlev0LnqfQnMDa1LhBNU9Hxl2lMFetxxqcht365fYEj/UpMJ6xueztmUunGnZ5atkziXdk5WZ8JYTTy54xy6nBdnkYwxjUvT C0UjN28EhI7I0mT13lI28H5KAjyUMgFpwiAJX6QBnXibQ9Dzi2w01LHsw2yGFc7eTilcxzCB8IeUpeHtXc3OIv2oyTP7pgUza4289YJqyP/0C03fFhNZD8QGCtznXx0OEuaVO+QbrfXek2QH5bbY9pM6TfEWi3TwTN2A43ojLDJW+NMvzdTdKYU2C2ORpFnQdO5XCNjGGKGFadsfzhhi8llUKVTejPvg== Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.53.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:53:39 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Lucas Stach , Adam Ford , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 02/12] phy: freescale: add Samsung HDMI PHY Date: Sat, 3 Feb 2024 10:52:42 -0600 Message-ID: <20240203165307.7806-3-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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: Lucas Stach This adds the driver for the Samsung HDMI PHY found on the i.MX8MP SoC. Signed-off-by: Lucas Stach Signed-off-by: Adam Ford Tested-by: Alexander Stein --- V4: Make lookup table hex values lower case. V3: Re-order the Makefile to keep it alphabetical Remove unused defines V2: Fixed some whitespace found from checkpatch Change error handling when enabling apbclk to use dev_err_probe Rebase on Linux-Next I (Adam) tried to help move this along, so I took Lucas' patch and attempted to apply fixes based on feedback. I don't have all the history, so apologies for that. --- drivers/phy/freescale/Kconfig | 6 + drivers/phy/freescale/Makefile | 1 + drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 1075 ++++++++++++++++++ 3 files changed, 1082 insertions(+) create mode 100644 drivers/phy/freescale/phy-fsl-samsung-hdmi.c diff --git a/drivers/phy/freescale/Kconfig b/drivers/phy/freescale/Kconfig index 853958fb2c06..5c2b73042dfc 100644 --- a/drivers/phy/freescale/Kconfig +++ b/drivers/phy/freescale/Kconfig @@ -35,6 +35,12 @@ config PHY_FSL_IMX8M_PCIE Enable this to add support for the PCIE PHY as found on i.MX8M family of SOCs. +config PHY_FSL_SAMSUNG_HDMI_PHY + tristate "Samsung HDMI PHY support" + depends on OF && HAS_IOMEM + help + Enable this to add support for the Samsung HDMI PHY in i.MX8MP. + endif config PHY_FSL_LYNX_28G diff --git a/drivers/phy/freescale/Makefile b/drivers/phy/freescale/Makefile index cedb328bc4d2..79e5f16d3ce8 100644 --- a/drivers/phy/freescale/Makefile +++ b/drivers/phy/freescale/Makefile @@ -4,3 +4,4 @@ obj-$(CONFIG_PHY_MIXEL_LVDS_PHY) += phy-fsl-imx8qm-lvds-phy.o obj-$(CONFIG_PHY_MIXEL_MIPI_DPHY) += phy-fsl-imx8-mipi-dphy.o obj-$(CONFIG_PHY_FSL_IMX8M_PCIE) += phy-fsl-imx8m-pcie.o obj-$(CONFIG_PHY_FSL_LYNX_28G) += phy-fsl-lynx-28g.o +obj-$(CONFIG_PHY_FSL_SAMSUNG_HDMI_PHY) += phy-fsl-samsung-hdmi.o diff --git a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c new file mode 100644 index 000000000000..bf0e2299d00f --- /dev/null +++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c @@ -0,0 +1,1075 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2020 NXP + * Copyright 2022 Pengutronix, Lucas Stach + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PHY_REG_33 0x84 +#define REG33_MODE_SET_DONE BIT(7) +#define REG33_FIX_DA BIT(1) + +#define PHY_REG_34 0x88 +#define REG34_PHY_READY BIT(7) +#define REG34_PLL_LOCK BIT(6) +#define REG34_PHY_CLK_READY BIT(5) + + +#define PHY_PLL_REGS_NUM 48 + +struct phy_config { + u32 clk_rate; + u8 regs[PHY_PLL_REGS_NUM]; +}; + +const struct phy_config phy_pll_cfg[] = { + { 22250000, { + 0x00, 0xd1, 0x4b, 0xf1, 0x89, 0x88, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x15, 0x25, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 23750000, { + 0x00, 0xd1, 0x50, 0xf1, 0x86, 0x85, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x03, 0x25, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 24000000, { + 0x00, 0xd1, 0x50, 0xf0, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x01, 0x25, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 24024000, { + 0x00, 0xd1, 0x50, 0xf1, 0x99, 0x02, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x00, 0x25, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 25175000, { + 0x00, 0xd1, 0x54, 0xfc, 0xcc, 0x91, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xf5, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 25200000, { + 0x00, 0xd1, 0x54, 0xf0, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xf4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 26750000, { + 0x00, 0xd1, 0x5a, 0xf2, 0x89, 0x88, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xe6, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 27000000, { + 0x00, 0xd1, 0x5a, 0xf0, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xe4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 27027000, { + 0x00, 0xd1, 0x5a, 0xf2, 0xfd, 0x0c, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xe4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 29500000, { + 0x00, 0xd1, 0x62, 0xf4, 0x95, 0x08, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xd1, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 30750000, { + 0x00, 0xd1, 0x66, 0xf4, 0x82, 0x01, 0x88, 0x45, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xc8, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 30888000, { + 0x00, 0xd1, 0x66, 0xf4, 0x99, 0x18, 0x88, 0x45, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xc7, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 33750000, { + 0x00, 0xd1, 0x70, 0xf4, 0x82, 0x01, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xb7, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8f, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 35000000, { + 0x00, 0xd1, 0x58, 0xb8, 0x8b, 0x88, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xb0, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8b, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 36000000, { + 0x00, 0xd1, 0x5a, 0xb0, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xab, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8b, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 36036000, { + 0x00, 0xd1, 0x5a, 0xb2, 0xfd, 0x0c, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0xab, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8b, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 40000000, { + 0x00, 0xd1, 0x64, 0xb0, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x9a, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x8b, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 43200000, { + 0x00, 0xd1, 0x5a, 0x90, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x8f, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x89, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 43243200, { + 0x00, 0xd1, 0x5a, 0x92, 0xfd, 0x0c, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x8f, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x89, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 44500000, { + 0x00, 0xd1, 0x5c, 0x92, 0x98, 0x11, 0x84, 0x41, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x8b, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x89, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 47000000, { + 0x00, 0xd1, 0x62, 0x94, 0x95, 0x82, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x83, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x89, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 47500000, { + 0x00, 0xd1, 0x63, 0x96, 0xa1, 0x82, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x00, 0x82, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x89, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 50349650, { + 0x00, 0xd1, 0x54, 0x7c, 0xc3, 0x8f, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xf5, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 50400000, { + 0x00, 0xd1, 0x54, 0x70, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xf4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 53250000, { + 0x00, 0xd1, 0x58, 0x72, 0x84, 0x03, 0x82, 0x41, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xe7, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 53500000, { + 0x00, 0xd1, 0x5a, 0x72, 0x89, 0x88, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xe6, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 54000000, { + 0x00, 0xd1, 0x5a, 0x70, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xe4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 54054000, { + 0x00, 0xd1, 0x5a, 0x72, 0xfd, 0x0c, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xe4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 59000000, { + 0x00, 0xd1, 0x62, 0x74, 0x95, 0x08, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xd1, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 59340659, { + 0x00, 0xd1, 0x62, 0x74, 0xdb, 0x52, 0x88, 0x47, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xd0, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 59400000, { + 0x00, 0xd1, 0x63, 0x70, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xcf, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 61500000, { + 0x00, 0xd1, 0x66, 0x74, 0x82, 0x01, 0x88, 0x45, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xc8, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 63500000, { + 0x00, 0xd1, 0x69, 0x74, 0x89, 0x08, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xc2, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x87, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 67500000, { + 0x00, 0xd1, 0x54, 0x52, 0x87, 0x03, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xb7, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 70000000, { + 0x00, 0xd1, 0x58, 0x58, 0x8b, 0x88, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xb0, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 72000000, { + 0x00, 0xd1, 0x5a, 0x50, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xab, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 72072000, { + 0x00, 0xd1, 0x5a, 0x52, 0xfd, 0x0c, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xab, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 74176000, { + 0x00, 0xd1, 0x5d, 0x58, 0xdb, 0xa2, 0x88, 0x41, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xa6, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 74250000, { + 0x00, 0xd1, 0x5c, 0x52, 0x90, 0x0d, 0x84, 0x41, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0xa6, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 78500000, { + 0x00, 0xd1, 0x62, 0x54, 0x87, 0x01, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x9d, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 80000000, { + 0x00, 0xd1, 0x64, 0x50, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x9a, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 82000000, { + 0x00, 0xd1, 0x66, 0x54, 0x82, 0x01, 0x88, 0x45, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x96, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 82500000, { + 0x00, 0xd1, 0x67, 0x54, 0x88, 0x01, 0x90, 0x49, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x95, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 89000000, { + 0x00, 0xd1, 0x70, 0x54, 0x84, 0x83, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x8b, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 90000000, { + 0x00, 0xd1, 0x70, 0x54, 0x82, 0x01, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x89, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x85, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 94000000, { + 0x00, 0xd1, 0x4e, 0x32, 0xa7, 0x10, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x83, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 95000000, { + 0x00, 0xd1, 0x50, 0x31, 0x86, 0x85, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x82, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 98901099, { + 0x00, 0xd1, 0x52, 0x3a, 0xdb, 0x4c, 0x88, 0x47, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x7d, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 99000000, { + 0x00, 0xd1, 0x52, 0x32, 0x82, 0x01, 0x88, 0x47, + 0x4f, 0x30, 0x33, 0x65, 0x10, 0x7d, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 100699300, { + 0x00, 0xd1, 0x54, 0x3c, 0xc3, 0x8f, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xf5, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 100800000, { + 0x00, 0xd1, 0x54, 0x30, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xf4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 102500000, { + 0x00, 0xd1, 0x55, 0x32, 0x8c, 0x05, 0x90, 0x4b, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xf0, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 104750000, { + 0x00, 0xd1, 0x57, 0x32, 0x98, 0x07, 0x90, 0x49, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xeb, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 106500000, { + 0x00, 0xd1, 0x58, 0x32, 0x84, 0x03, 0x82, 0x41, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xe7, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 107000000, { + 0x00, 0xd1, 0x5a, 0x32, 0x89, 0x88, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xe6, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 108000000, { + 0x00, 0xd1, 0x5a, 0x30, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xe4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 108108000, { + 0x00, 0xd1, 0x5a, 0x32, 0xfd, 0x0c, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xe4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 118000000, { + 0x00, 0xd1, 0x62, 0x34, 0x95, 0x08, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xd1, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 118800000, { + 0x00, 0xd1, 0x63, 0x30, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xcf, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 123000000, { + 0x00, 0xd1, 0x66, 0x34, 0x82, 0x01, 0x88, 0x45, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xc8, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 127000000, { + 0x00, 0xd1, 0x69, 0x34, 0x89, 0x08, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xc2, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 135000000, { + 0x00, 0xd1, 0x70, 0x34, 0x82, 0x01, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xb7, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 135580000, { + 0x00, 0xd1, 0x71, 0x39, 0xe9, 0x82, 0x9c, 0x5b, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xb6, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 137520000, { + 0x00, 0xd1, 0x72, 0x38, 0x99, 0x10, 0x85, 0x41, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xb3, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 138750000, { + 0x00, 0xd1, 0x73, 0x35, 0x88, 0x05, 0x90, 0x4d, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xb2, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 140000000, { + 0x00, 0xd1, 0x75, 0x36, 0xa7, 0x90, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xb0, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 144000000, { + 0x00, 0xd1, 0x78, 0x30, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xab, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 148352000, { + 0x00, 0xd1, 0x7b, 0x35, 0xdb, 0x39, 0x90, 0x45, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xa6, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 148500000, { + 0x00, 0xd1, 0x7b, 0x35, 0x84, 0x03, 0x90, 0x45, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xa6, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x83, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 154000000, { + 0x00, 0xd1, 0x40, 0x18, 0x83, 0x01, 0x00, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0xa0, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 157000000, { + 0x00, 0xd1, 0x41, 0x11, 0xa7, 0x14, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0x9d, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 160000000, { + 0x00, 0xd1, 0x42, 0x12, 0xa1, 0x20, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0x9a, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 162000000, { + 0x00, 0xd1, 0x43, 0x18, 0x8b, 0x08, 0x96, 0x55, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0x98, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 164000000, { + 0x00, 0xd1, 0x45, 0x11, 0x83, 0x82, 0x90, 0x4b, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0x96, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 165000000, { + 0x00, 0xd1, 0x45, 0x11, 0x84, 0x81, 0x90, 0x4b, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0x95, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 180000000, { + 0x00, 0xd1, 0x4b, 0x10, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0x89, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 185625000, { + 0x00, 0xd1, 0x4e, 0x12, 0x9a, 0x95, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0x85, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 188000000, { + 0x00, 0xd1, 0x4e, 0x12, 0xa7, 0x10, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0x83, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 198000000, { + 0x00, 0xd1, 0x52, 0x12, 0x82, 0x01, 0x88, 0x47, + 0x4f, 0x30, 0x33, 0x65, 0x20, 0x7d, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 205000000, { + 0x00, 0xd1, 0x55, 0x12, 0x8c, 0x05, 0x90, 0x4b, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xf0, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 209500000, { + 0x00, 0xd1, 0x57, 0x12, 0x98, 0x07, 0x90, 0x49, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xeb, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 213000000, { + 0x00, 0xd1, 0x58, 0x12, 0x84, 0x03, 0x82, 0x41, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xe7, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 216000000, { + 0x00, 0xd1, 0x5a, 0x10, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xe4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 216216000, { + 0x00, 0xd1, 0x5a, 0x12, 0xfd, 0x0c, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xe4, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 237600000, { + 0x00, 0xd1, 0x63, 0x10, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xcf, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 254000000, { + 0x00, 0xd1, 0x69, 0x14, 0x89, 0x08, 0x80, 0x40, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xc2, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 277500000, { + 0x00, 0xd1, 0x73, 0x15, 0x88, 0x05, 0x90, 0x4d, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xb2, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 288000000, { + 0x00, 0xd1, 0x78, 0x10, 0x00, 0x00, 0x80, 0x00, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xab, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, { + 297000000, { + 0x00, 0xd1, 0x7b, 0x15, 0x84, 0x03, 0x90, 0x45, + 0x4f, 0x30, 0x33, 0x65, 0x30, 0xa6, 0x24, 0x80, + 0x6c, 0xf2, 0x67, 0x00, 0x10, 0x81, 0x30, 0x32, + 0x60, 0x8f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe0, 0x83, 0x0f, 0x3e, 0xf8, 0x00, 0x00, + }, + }, +}; + +struct fsl_samsung_hdmi_phy { + struct device *dev; + void __iomem *regs; + struct clk *apbclk; + struct clk *refclk; + + /* clk provider */ + struct clk_hw hw; + const struct phy_config *cur_cfg; +}; + +static inline struct fsl_samsung_hdmi_phy * +to_fsl_samsung_hdmi_phy(struct clk_hw *hw) +{ + return container_of(hw, struct fsl_samsung_hdmi_phy, hw); +} + +static int fsl_samsung_hdmi_phy_configure(struct fsl_samsung_hdmi_phy *phy, + const struct phy_config *cfg) +{ + int i, ret; + u8 val; + + /* HDMI PHY init */ + writeb(REG33_FIX_DA, phy->regs + PHY_REG_33); + + for (i = 0; i < PHY_PLL_REGS_NUM; i++) + writeb(cfg->regs[i], phy->regs + i * 4); + + writeb(REG33_FIX_DA | REG33_MODE_SET_DONE, phy->regs + PHY_REG_33); + + ret = readb_poll_timeout(phy->regs + PHY_REG_34, val, + val & REG34_PLL_LOCK, + 50, 20000); + if (ret) + dev_err(phy->dev, "PLL failed to lock\n"); + + return ret; +} + +static unsigned long phy_clk_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + struct fsl_samsung_hdmi_phy *phy = to_fsl_samsung_hdmi_phy(hw); + + if (!phy->cur_cfg) + return 74250000; + + return phy->cur_cfg->clk_rate; +} + +static long phy_clk_round_rate(struct clk_hw *hw, + unsigned long rate, unsigned long *parent_rate) +{ + int i; + + for (i = ARRAY_SIZE(phy_pll_cfg) - 1; i >= 0; i--) + if (phy_pll_cfg[i].clk_rate <= rate) + return phy_pll_cfg[i].clk_rate; + + return -EINVAL; +} + +static int phy_clk_set_rate(struct clk_hw *hw, + unsigned long rate, unsigned long parent_rate) +{ + struct fsl_samsung_hdmi_phy *phy = to_fsl_samsung_hdmi_phy(hw); + int i; + + for (i = ARRAY_SIZE(phy_pll_cfg) - 1; i >= 0; i--) + if (phy_pll_cfg[i].clk_rate <= rate) + break; + + if (i < 0) + return -EINVAL; + + phy->cur_cfg = &phy_pll_cfg[i]; + + return fsl_samsung_hdmi_phy_configure(phy, phy->cur_cfg); +} + +static const struct clk_ops phy_clk_ops = { + .recalc_rate = phy_clk_recalc_rate, + .round_rate = phy_clk_round_rate, + .set_rate = phy_clk_set_rate, +}; + +static int phy_clk_register(struct fsl_samsung_hdmi_phy *phy) +{ + struct device *dev = phy->dev; + struct device_node *np = dev->of_node; + struct clk_init_data init; + const char *parent_name; + struct clk *phyclk; + int ret; + + parent_name = __clk_get_name(phy->refclk); + + init.parent_names = &parent_name; + init.num_parents = 1; + init.flags = 0; + init.name = "hdmi_pclk"; + init.ops = &phy_clk_ops; + + phy->hw.init = &init; + + phyclk = devm_clk_register(dev, &phy->hw); + if (IS_ERR(phyclk)) + return dev_err_probe(dev, PTR_ERR(phyclk), + "failed to register clock\n"); + + ret = of_clk_add_provider(np, of_clk_src_simple_get, phyclk); + if (ret) + return dev_err_probe(dev, ret, + "failed to register clock provider\n"); + + return 0; +} + +static int fsl_samsung_hdmi_phy_probe(struct platform_device *pdev) +{ + struct fsl_samsung_hdmi_phy *phy; + int ret; + + phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL); + if (!phy) + return -ENOMEM; + + platform_set_drvdata(pdev, phy); + phy->dev = &pdev->dev; + + phy->regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(phy->regs)) + return PTR_ERR(phy->regs); + + phy->apbclk = devm_clk_get(phy->dev, "apb"); + if (IS_ERR(phy->apbclk)) + return dev_err_probe(phy->dev, PTR_ERR(phy->apbclk), + "failed to get apb clk\n"); + + phy->refclk = devm_clk_get(phy->dev, "ref"); + if (IS_ERR(phy->refclk)) + return dev_err_probe(phy->dev, PTR_ERR(phy->refclk), + "failed to get ref clk\n"); + + ret = clk_prepare_enable(phy->apbclk); + if (ret) { + dev_err(phy->dev, "failed to enable apbclk\n"); + return ret; + } + + pm_runtime_get_noresume(phy->dev); + pm_runtime_set_active(phy->dev); + pm_runtime_enable(phy->dev); + + ret = phy_clk_register(phy); + if (ret) { + dev_err(&pdev->dev, "register clk failed\n"); + goto register_clk_failed; + } + + pm_runtime_put(phy->dev); + + return 0; + +register_clk_failed: + clk_disable_unprepare(phy->apbclk); + + return ret; +} + +static int fsl_samsung_hdmi_phy_remove(struct platform_device *pdev) +{ + of_clk_del_provider(pdev->dev.of_node); + + return 0; +} + +#ifdef CONFIG_PM +static int fsl_samsung_hdmi_phy_suspend(struct device *dev) +{ + struct fsl_samsung_hdmi_phy *phy = dev_get_drvdata(dev); + + clk_disable_unprepare(phy->apbclk); + + return 0; +} + +static int fsl_samsung_hdmi_phy_resume(struct device *dev) +{ + struct fsl_samsung_hdmi_phy *phy = dev_get_drvdata(dev); + int ret = 0; + + ret = clk_prepare_enable(phy->apbclk); + if (ret) { + dev_err(phy->dev, "failed to enable apbclk\n"); + return ret; + } + + if (phy->cur_cfg) + ret = fsl_samsung_hdmi_phy_configure(phy, phy->cur_cfg); + + return ret; + +} +#endif + +static const struct dev_pm_ops fsl_samsung_hdmi_phy_pm_ops = { + SET_RUNTIME_PM_OPS(fsl_samsung_hdmi_phy_suspend, + fsl_samsung_hdmi_phy_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) +}; + +static const struct of_device_id fsl_samsung_hdmi_phy_of_match[] = { + { + .compatible = "fsl,imx8mp-hdmi-phy", + }, { + /* sentinel */ + } +}; +MODULE_DEVICE_TABLE(of, fsl_samsung_hdmi_phy_of_match); + +static struct platform_driver fsl_samsung_hdmi_phy_driver = { + .probe = fsl_samsung_hdmi_phy_probe, + .remove = fsl_samsung_hdmi_phy_remove, + .driver = { + .name = "fsl-samsung-hdmi-phy", + .of_match_table = fsl_samsung_hdmi_phy_of_match, + .pm = &fsl_samsung_hdmi_phy_pm_ops, + }, +}; +module_platform_driver(fsl_samsung_hdmi_phy_driver); + +MODULE_AUTHOR("Sandor Yu "); +MODULE_DESCRIPTION("SAMSUNG HDMI 2.0 Transmitter PHY Driver"); +MODULE_LICENSE("GPL v2"); From patchwork Sat Feb 3 16:52:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544307 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 81794C4828D for ; Sat, 3 Feb 2024 16:53:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 83F5C10E9B4; Sat, 3 Feb 2024 16:53:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cjM+DhHc"; dkim-atps=neutral Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id D7D4B10E9B4 for ; Sat, 3 Feb 2024 16:53:48 +0000 (UTC) Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-7bed9fb159fso131425439f.1 for ; Sat, 03 Feb 2024 08:53:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979228; x=1707584028; 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=5yxNJ6iw10E/jIc+eH30kqf5Ccz8IbGrYAyBw9Fu8JA=; b=cjM+DhHc5lbA244Ga/dNSMeCLrhDUjcngR3nZtHHhxWqSgsXiZLaFkS/XXWsIhdbeW ieKqiBjIBilxTds6fEx/lLB1y0XJLpz8icnLTpr9XbC6b5glrZ+7GJOvrS9njsqP3Dx7 oIOPZMPXn90wE6jnCXvYfu1y8/0ot50P8gP+M1UpXyuu72vIJciB4BSr0dGBW3Gi6bRO 61ZSv3+IDw9pZIytgwJeFdsw7pGf7+wyMpCnYvNsShgJ+VjOF4Dqa1gH5jkykBzg83dW qkEmRM7lDDVamqlzfMH1ar5Dlt5TbGqJ5ydK6YspkfIFi0eLQs3tdQcp9vWfxonKIgIW mhSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979228; x=1707584028; 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=5yxNJ6iw10E/jIc+eH30kqf5Ccz8IbGrYAyBw9Fu8JA=; b=FcXkdElnk0Cef5oRMj+NKzH2FcqUg8cB2AZ7F0Hyy9s98Fd3rqN5kBMXBpEIRb2Zyi Vr4nu6alUqlHGsyCJrR2+/fSJibg5sj6D0jfWlZqeCxArtKMXErtznSl+F3CiB7ex/KR z6KNA0h5ig6r6UD6vLW+6ffh8oS4h2P7Yz694IcKbGgt9nufuBqfv4qYRA8Rz79XUoj4 nlLKZJ+hHGNiY3HUNUIxpCqvyLtFnLuyu2c722PjTcuuFkryW2kNIDVXB0rki6+TbEfB irwMjlgiTuvY6mHcW3EGViuFNI6cEi1jMXoXkCTzdqiKxJwfRlC++DKLfP4WDvqUclyw YXxw== X-Gm-Message-State: AOJu0YzZSJZ33VT8BC72sjfnOs2MUeSxZDIpk6cZjaTcmE+phAEaXYLn LNpBzScBKB4AH8QNdxzOLS91LJ6NpKcYnIzJDLYxvmvetmVBuZ9x X-Google-Smtp-Source: AGHT+IGLICMierknlRorVEXNALWPHIbd9g8JvYQciri7x3uPr5CUp4NijI+2uAuRaeVh6/Kmz8+V0w== X-Received: by 2002:a6b:c953:0:b0:7c0:1f36:b164 with SMTP id z80-20020a6bc953000000b007c01f36b164mr12895332iof.15.1706979227992; Sat, 03 Feb 2024 08:53:47 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVA9CZ4OBFcoM04s5n21XZMv7Q/nxNcmPFO+x1Hx/0kUqPWvHWgXAMhmWWYSeu3FnFFbdWnIQIXkcJ8bvjPe4SRA+PEake0K2o9+SdFQVa0uhauF6xPTPbN6t02ZtR4ijMGSn6bpH/o1D/WhzSp1LNi/qJBO6dUNrXqU0xlwDLjVT0na4dfFVj0vjAP8PLreg0xiTninmHNzxkiLB59Wze+9DOg/GLsJH4TPAUkmXpKZUzkeSul4u9iC6945qk4uxoHVuI4LSZXsQ7y9qiyzP2cMlcs+JP0fV4m5o5JizP5UVba5st/J/YGP/ZOTzDmylMIzpS0bkkba+K1/9SD6wR++0T+vPbWfHEe3wJwDqVW15We868sluUY1Hc5JKoa5QMsz40Hn37WkpB/sCANoznyJeNkPi3K0n1T/KmJJtLTBr1VzyFNKujQekHA3LzIN3TrDhO1XmFYseWfskZ/6n5IdfNiFNYU3rCxUzR6aIYmogpso3AFRoUwnAgAD0esSSDoQ5MCBq/Kh1ck3wd1Rbcu77+yjr6xL/U9pQmqi4sWob0k1ENb/g9aYf8PGpWQaj0vzwjmKo3L3PWIlsYk7bF6hdeM+08pLHa75lJ0UX69ERLEVOhEQ3M+HZOzzmHwP2zGjmSVp6Yf0IOs9xqmJvw32JvuHy+LYGtkK+fWKEw6mjfAYMCyzceYBz8qtTY2se/d98gG3FunwStU6JBNtSDkTHnzjseKe9YQCCR48d63IRE/nASGuG1uzo7Bs6Sti1A252RslipIk7/QB2Is1ulD8+N+9xAvPZqDb25ghHibwI6MlFtaCx66JtMIJsw6TklhYfBvigYAeGRZ9p7yU6jsENqoAhAgA0oJsoBZdtjWtMOkjSu3Sqt+fWW5RpD+GSGtXiVhQ59kCwo59MlPjZfDiPi+XmXRKRrqekWAefFpV8tMcq30iwW+lTh+2VsESwvX7E EIkQFHHCNJraRxEphrKmY5jpUPi2se35+9fzW/8/MJU1JVMVbaJ6Ju3BDhiaaIF9ish60lHhllqGuZQdDOEY3tReKYlh46VVzGRNUoYhknSUM9+VgaYtxzn0LVe7CYPkurkr+0nTkOZ030FUw6CpdAMA2THIwB00py45S/j8jbnvTzvgVIlNAeY0tGiYKzEUfSffiU2FR9K7ClVCD3rJDx42Ni2vHIhw== Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:53:46 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Adam Ford , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , Lucas Stach , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 03/12] dt-bindings: soc: imx: add missing clock and power-domains to imx8mp-hdmi-blk-ctrl Date: Sat, 3 Feb 2024 10:52:43 -0600 Message-ID: <20240203165307.7806-4-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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" Per guidance from the NXP downstream kernel, if the clock is disabled before HDMI/LCDIF probe, LCDIF will not get pixel clock from HDMI PHY and throw an error: [CRTC:39:crtc-2] vblank wait timed out WARNING: CPU: 2 PID: 9 at drivers/gpu/drm/drm_atomic_helper.c: 1634 drm_atomic_helper_wait_for_vblanks.part.0+0x23c/0x260 Fix this by adding the fdcc clock to the hdmi_blk_ctrl. This should be safe, since neither this power domain nor the dependent HDMI and LCDIF drivers been enabled or added to the SoC device tree yet. According to Sandor Yu from NXP, "the FDCC clock is not for HDMITX in desgin, but it is part of HDMI domain that needed by HDMITX. So I think it is reasonable added it to the power domain driver." The driver also supports two power domains which are missing from the binding that also fix an issue with resuming from suspend. Signed-off-by: Adam Ford Reviewed-by: Rob Herring --- V2: Update commit message to both show error and give a bit more background. Add missing power domains hdcp and hdrv as pointed out by Marek Vasut --- .../soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml index 1be4ce2a45e8..bd1cdaa4f54b 100644 --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mp-hdmi-blk-ctrl.yaml @@ -27,8 +27,8 @@ properties: const: 1 power-domains: - minItems: 8 - maxItems: 8 + minItems: 10 + maxItems: 10 power-domain-names: items: @@ -40,10 +40,12 @@ properties: - const: trng - const: hdmi-tx - const: hdmi-tx-phy + - const: hdcp + - const: hrv clocks: - minItems: 4 - maxItems: 4 + minItems: 5 + maxItems: 5 clock-names: items: @@ -51,6 +53,7 @@ properties: - const: axi - const: ref_266m - const: ref_24m + - const: fdcc interconnects: maxItems: 3 @@ -82,12 +85,15 @@ examples: clocks = <&clk IMX8MP_CLK_HDMI_APB>, <&clk IMX8MP_CLK_HDMI_ROOT>, <&clk IMX8MP_CLK_HDMI_REF_266M>, - <&clk IMX8MP_CLK_HDMI_24M>; - clock-names = "apb", "axi", "ref_266m", "ref_24m"; + <&clk IMX8MP_CLK_HDMI_24M>, + <&clk IMX8MP_CLK_HDMI_FDCC_TST>; + clock-names = "apb", "axi", "ref_266m", "ref_24m", "fdcc"; power-domains = <&pgc_hdmimix>, <&pgc_hdmimix>, <&pgc_hdmimix>, <&pgc_hdmimix>, <&pgc_hdmimix>, <&pgc_hdmimix>, - <&pgc_hdmimix>, <&pgc_hdmi_phy>; + <&pgc_hdmimix>, <&pgc_hdmi_phy>, + <&pgc_hdmimix>, <&pgc_hdmimix>; power-domain-names = "bus", "irqsteer", "lcdif", "pai", "pvi", "trng", - "hdmi-tx", "hdmi-tx-phy"; + "hdmi-tx", "hdmi-tx-phy", + "hdcp", "hrv"; #power-domain-cells = <1>; }; From patchwork Sat Feb 3 16:52:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544308 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 8D885C48291 for ; Sat, 3 Feb 2024 16:53:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD1E510E9D8; Sat, 3 Feb 2024 16:53:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nFHgMUdO"; dkim-atps=neutral Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id B5BB510E9D8 for ; Sat, 3 Feb 2024 16:53:54 +0000 (UTC) Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7c01af010bcso114997339f.0 for ; Sat, 03 Feb 2024 08:53:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979234; x=1707584034; 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=xTz41youk0MNhd57tDHSRqDDcqb1mXikbXnVvCDl5qs=; b=nFHgMUdO4i0BAdTO0z6Xbbr7zQaH8+R/WUrnWiD48sAJD/4fkVbmUgbmphQkIDq+uD psGwpIzuDYgRGqO7sYCV42IFW9oO7t6Jw7tZtMMQo8JJQOqRYdbAV+zfGyxHuwtUcDbE sSK4rUpBJP79DwTVaOdFLsbJffwycUQZp/x2F+1KVmG0RdyAp8AvE56E+5qf+nZ9maPE ZPLOhhhyJANDGcfM/IRsEXG6diAUg008CTuNa/dEJOW9N63YnlZE1napz+T43qHyubzC tVW1seDNuKccYBI91bDHto1A05SZ+WQGzuvOsHQL+fKzw+Fz9ShyoGmCz1znERCh+26D J4Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979234; x=1707584034; 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=xTz41youk0MNhd57tDHSRqDDcqb1mXikbXnVvCDl5qs=; b=W1JRdF4nLf/o9fkYKz5ibc6cJDWbT2g1XhwMZdaUjZQtiDH1tCVaoUJ3md/aJ3lCqw MBgljPDDYmkoucZ6xWHxdTVoIZcHEo995t9mUzghDYRpQ1WKqDQtipoF1XvZiHLOmagL IpIwH3OJvLk6D5VMsB0eP9T9vjPhIT0tbWeGq3/eizu37TwrMYqvgGyDvUjTtV2UfcUP T4Drg/il6I/cyvZ62V/Y8IRQDFNvMtUTwBhOYNePSVE381tD2bn1S9GU5GaZvV6UHa/F IgvjsJngOIujPj985N9eN6mVFDO5aW7fYBG/7voK64Pl6K7Bq3b8JXpgK3uJQviXJ6iu +00A== X-Gm-Message-State: AOJu0Yzi7wJMK9ZOddXoKXEVmvL7JVfu+q86R9y0S57NoIfj3gsiBbaQ d5Z+cvjWAMpohHwvtzYQpZ1JcQdfnJrp0/v3HeLmRQGeM0rSzpdg X-Google-Smtp-Source: AGHT+IFyEA0Xii6DxXVLQmKqTt50wj06h7R4pQOHBCC/7rAn9AxwjHk/98owuv5mKfuaCa0UFjMBEQ== X-Received: by 2002:a6b:fb03:0:b0:7c0:3e75:f46d with SMTP id h3-20020a6bfb03000000b007c03e75f46dmr4802889iog.1.1706979233728; Sat, 03 Feb 2024 08:53:53 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVZdVoNbFEdixs+13RcadW8GCllVZ7xKVTj2NXM54/anl1fBuhrAHCat0rqnv3RhPASNx1opDJMA21l2z1ij3X8Rx12yVkcQF3JZTOK/TdeH+RaAtahnLEJQFr1EBEUsLv9uMvFjgkQj5cv+aAdNFwFbShA0kgja3hR3iG+/3YWHfTuV/1S1mP0chXWaEzo1MccDnVMn18czRjOnRdwS7S8EUhB/wt2V5/2+DD3jLoPD1YGeWMWIWwvNSPDn99bqMs6krYj7WIBM8uXm9uPmLjqWgjON/i6J4pg7Gd0ha42QIp6q8ORyMPm+DNgUlu+ZnGaGNxp7pw/60q7lPdfXZAwTb4x3OFApr+MUxTmbZOXDfUy89W0rZix+B3E3fOytm2w1Os/SuG+zS2jWyWAG49gtmBoWgVC9EN0+CjvIUNdxiAk0NCabImRXO4kvDZ/05GrkGmjNjwhmCwOHTNxNJ/VYPYDz8C+m20Zh3YXaeRs/ZzFi1qNX6Hbu6nGQgB53BFrrE7DW8wy7BerDEwfQN7OF6Lxf3q82TSpWlsu+op0Si2PXXkMX/A9CMmDR5IQNaxVjjL4V/4Ykpc/iOapGlUYY9hGaC4h9/BtwNDpSpu9qJs5ZIS6Pds7A8ARxvis4/LecvT0lPDtItXD1lA9gzCH9fIkyLGw/tO9z1GQdU5fJzgUlbZQcdA1S2vN/dobTHOkGlgkEkBEEypLuGbX/OJCO0DBcGp7xE8+MtJradWpWSB7zSmA0Sp2ghrlum17CIgR353mLSHpuhim31D3HFt5reRqCIhlV5aClUhtcLqzM/ACrx3JM79u06NOcVklVWAb5WPhjkdTaw2RJA+/DBN7RMsH9Ruthu4++IamxsZN0zGXu94y3o/HqeWtxxec24GM6y7XWNJl1u7NWvSf9ptVeauIDMqfUwFnszPpQr0AR4e3aUVEVEPFasL8tlOP00vcN+ mpGj9R8UMZ1+rT0d+JO6gXS+Yd+LDUMkxu/IWny7gVOlL4rA/IwaPBq/NnhEmmHkNPit6gfH7urCstUx8uEBN6/fIb4pnzHC1PX52xvzvlMLFrlSyowHFSRg+imxQyt00NhHYnbLy7R8EvstG8GndKToyv0053jjyytesykhtwZRO2JKVkUX/w6GQUERQnIpcKJZJ6aWP9YjuMSDPAxUDfkw/dQPb++belRYOp318rrcFN+Sd0dXaZDCDwVPT5KRGQZqg2zIermNjiPcM= Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:53:51 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Adam Ford , Jacky Bai , Sandor Yu , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , Lucas Stach , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 04/12] pmdomain: imx8mp-blk-ctrl: imx8mp_blk: Add fdcc clock to hdmimix domain Date: Sat, 3 Feb 2024 10:52:44 -0600 Message-ID: <20240203165307.7806-5-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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" According to i.MX8MP RM and HDMI ADD, the fdcc clock is part of hdmi rx verification IP that should not enable for HDMI TX. But actually if the clock is disabled before HDMI/LCDIF probe, LCDIF will not get pixel clock from HDMI PHY and print the error logs: [CRTC:39:crtc-2] vblank wait timed out WARNING: CPU: 2 PID: 9 at drivers/gpu/drm/drm_atomic_helper.c:1634 drm_atomic_helper_wait_for_vblanks.part.0+0x23c/0x260 Add fdcc clock to LCDIF and HDMI TX power domains to fix the issue. Signed-off-by: Adam Ford Reviewed-by: Jacky Bai Signed-off-by: Sandor Yu --- V2: No Change --- drivers/pmdomain/imx/imx8mp-blk-ctrl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c index e488cf79b800..77e889165eed 100644 --- a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c +++ b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c @@ -55,7 +55,7 @@ struct imx8mp_blk_ctrl_domain_data { const char *gpc_name; }; -#define DOMAIN_MAX_CLKS 2 +#define DOMAIN_MAX_CLKS 3 #define DOMAIN_MAX_PATHS 3 struct imx8mp_blk_ctrl_domain { @@ -457,8 +457,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = { }, [IMX8MP_HDMIBLK_PD_LCDIF] = { .name = "hdmiblk-lcdif", - .clk_names = (const char *[]){ "axi", "apb" }, - .num_clks = 2, + .clk_names = (const char *[]){ "axi", "apb", "fdcc" }, + .num_clks = 3, .gpc_name = "lcdif", .path_names = (const char *[]){"lcdif-hdmi"}, .num_paths = 1, @@ -483,8 +483,8 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = { }, [IMX8MP_HDMIBLK_PD_HDMI_TX] = { .name = "hdmiblk-hdmi-tx", - .clk_names = (const char *[]){ "apb", "ref_266m" }, - .num_clks = 2, + .clk_names = (const char *[]){ "apb", "ref_266m", "fdcc" }, + .num_clks = 3, .gpc_name = "hdmi-tx", }, [IMX8MP_HDMIBLK_PD_HDMI_TX_PHY] = { From patchwork Sat Feb 3 16:52:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544309 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 A4159C4828F for ; Sat, 3 Feb 2024 16:54:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 20FC510E9FF; Sat, 3 Feb 2024 16:54:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nWpdMUtl"; dkim-atps=neutral Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id EC42F10E9FF for ; Sat, 3 Feb 2024 16:53:58 +0000 (UTC) Received: by mail-io1-f43.google.com with SMTP id ca18e2360f4ac-7bfd5eeffefso126456439f.1 for ; Sat, 03 Feb 2024 08:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979238; x=1707584038; 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=taDwADqgs/vXZTWtQL/uIsBG3gMoUnf1EEy+EC/Jro4=; b=nWpdMUtlKcO8RyUoR8O1yRiNMEfP1ZivgzkS4xQNb+MfWOVWfza3EZqvUhQ1pZq0TR nSCMTWCaLqXOFLZE8qRH3Mw0vzpfn4muRd3u1+YInWVzBre6BZUpObaeB/eljFxgUQJA gbduqp92Sx3GBfyCrj54Sk/c4LHOTh709nIanO5EfvFQOp10c4eM9ghBaTB0NCsbET15 YY2nMbvnj31WVK89llJ7UR+HruM1L90TCdnXzrhXqDthhV5FlsydN3FTqy4kZCfa43rd I9opONfblkL99sTKkFWeRNr8GSIFL3QYvgLEE/hPs1RuODMWNac+s7VMVsW5ifzsIicO veXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979238; x=1707584038; 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=taDwADqgs/vXZTWtQL/uIsBG3gMoUnf1EEy+EC/Jro4=; b=Ctk3qi6zhLiqPRlsvcJabILN7yLPp2DiB8noEhfQKcklW561kCS/Z1PKJSx4dVEIdA f0JaPxiwpFaB2Hkff8vOH9Ta8cQgmxEnEcZHO//PToN7FbUFFj44gEqiUiXD7SH8HZS8 NtQf/0cpSG46KRYAitPGXNCOXhgJMTQ2SGj3U75nh9o4Kjlm78/yAByqlxzOLOpQmxOr CklHbumFnF+pF43QBWVywoxBXst/1tj8UA0Dlj+kLnOJrL4aaGVP9puAOxQP7B/63Hbz MHsFoHSz1ifI5XWhSBticjb7Mj/Hv6UY1gDvS8cAKZLy15yKJboUlP4259ND2eGDjsCj gCNA== X-Gm-Message-State: AOJu0Yw5MUMalbiL2OFJzHGACBURiT765M54PFFD5xFgsaluQEGrZZvf yK2d8TjLOye/JR5AoHzlLVdhiuezU7+ibtLixOtKWVQEcY6/eHo8 X-Google-Smtp-Source: AGHT+IGSIrWbB8jR5uaJBwAlIfAilmzMPT34+qSqtn8M+K3ASa98MtXlrgLootz9nRYzgIf22ww9/A== X-Received: by 2002:a05:6602:2806:b0:7c0:3e72:998c with SMTP id d6-20020a056602280600b007c03e72998cmr6003233ioe.9.1706979238133; Sat, 03 Feb 2024 08:53:58 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUD62zg8tJ7qMwNwxmrNMP/+OYqlFBEhICF5gxfVobVJ4LnXerUR5pumG2PtuG5+Cmz7Qfs6PkvZNFzjWFg6HopgDfdIH+CrhJFHbAwLVkYFE1Gky5g76gmocMJz7rKSZSFH0wz0PGpn+QujBSeWaW1bTd4givdDsdoFza+0pxjcv6yKGy7rEu1/s7iTfuXWHEMSK1g8YxlUZ4ksVEg9YAVZdvygkgS04Ukez64aJpKQb5+2v2XodxFNH/1cAABEgBKWMPLLzszvggkQTSHX1GIolk8NFkZPPeLGYeYiUkpbeoRwsEhdm91rZxvI2XOpmQOT3rUKclMKk6QdMrzukJVrFFPyjXfvG//tBYVoSxIwE0BlykyOEbpyG+4FQFGigvg4XfwpnyZMSC9GgupXhY5d+t8AFac/q1sF2IdQXbISCSiY4ZAAaQI5dXDRVcf5BbfkjTrnoErFj1kkAX0sAKCdiLjVXD45OcGOIwrmReYBeajeQ9mV18gnX4UKlvr+uguAgY1PxVQ3g+CAAvwSlD8PdWuun7nmhBAM0+PBzXyteqCNHXeiswiDUcbqMyv9vhmmzJSJJP9iU07weq0Ne/emI/B35nszR/mec2Vw6qhN2F7u7TA22yJ61oR0pGna47Zv3k+AwHQdQ2z1JcP/od3janjHDB1aTzX9NNnYpC/WvYklUCj757VfqhEfzsVwqOTqRvRQcbYSS6bjs695FEGfS+gTqoI9XaRfw/wVyQvzSz0pCKN+ybkBc8UrWX3nt1CEdOw0keAF86Jp6Og8hwRbADGnVhU80JfhgEPIiVyzk4gWlVMOGMPHgDd00CbvE1A5M2HCUJrRackwYDqHSvO/JLky9AjE2C+/u1wQaqiRVngv6pYBgBUAzCqqqEK7X680hK1IciJbH63FpWpnoSS4FSoDH6zlB7rzbllUnyRFzEN8lftCtU9vmNGp84/0bO6zC tPc+kBpnmgA8VI5bKu/CBQBhxIXDGMbduBGf5zFg/mUqGiqIRi/nukYaNl5I8AcS2jy5e2zjr3Jfer0jAAOV7PBb7frc24lvmLSilFIjuj+0MkhPhuOWv5cvogwrsDLXMJ75BPLDJ3j54uiLyFRUhAmNX80hkWwe4o9O3vAKH/wFiBgsUin1KJr7WD0JtKOfNhxluLTZcCpooyc1EfcgOYrHNZNWHp8A== Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.53.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:53:56 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Lucas Stach , Adam Ford , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 05/12] arm64: dts: imx8mp: add HDMI power-domains Date: Sat, 3 Feb 2024 10:52:45 -0600 Message-ID: <20240203165307.7806-6-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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: Lucas Stach This adds the PGC and HDMI blk-ctrl nodes providing power control for HDMI subsystem peripherals. Signed-off-by: Adam Ford Signed-off-by: Lucas Stach --- V2: Add missing power-domains hdcp and hrv --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 76c73daf546b..5c54073de615 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -836,6 +836,23 @@ pgc_mediamix: power-domain@10 { <&clk IMX8MP_CLK_MEDIA_APB_ROOT>; }; + pgc_hdmimix: power-domains@14 { + #power-domain-cells = <0>; + reg = ; + clocks = <&clk IMX8MP_CLK_HDMI_ROOT>, + <&clk IMX8MP_CLK_HDMI_APB>; + assigned-clocks = <&clk IMX8MP_CLK_HDMI_AXI>, + <&clk IMX8MP_CLK_HDMI_APB>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>, + <&clk IMX8MP_SYS_PLL1_133M>; + assigned-clock-rates = <500000000>, <133000000>; + }; + + pgc_hdmi_phy: power-domains@15 { + #power-domain-cells = <0>; + reg = ; + }; + pgc_mipi_phy2: power-domain@16 { #power-domain-cells = <0>; reg = ; @@ -1361,6 +1378,27 @@ eqos: ethernet@30bf0000 { intf_mode = <&gpr 0x4>; status = "disabled"; }; + + hdmi_blk_ctrl: blk-ctrl@32fc0000 { + compatible = "fsl,imx8mp-hdmi-blk-ctrl", "syscon"; + reg = <0x32fc0000 0x23c>; + clocks = <&clk IMX8MP_CLK_HDMI_APB>, + <&clk IMX8MP_CLK_HDMI_ROOT>, + <&clk IMX8MP_CLK_HDMI_REF_266M>, + <&clk IMX8MP_CLK_HDMI_24M>, + <&clk IMX8MP_CLK_HDMI_FDCC_TST>; + clock-names = "apb", "axi", "ref_266m", "ref_24m", "fdcc"; + power-domains = <&pgc_hdmimix>, <&pgc_hdmimix>, + <&pgc_hdmimix>, <&pgc_hdmimix>, + <&pgc_hdmimix>, <&pgc_hdmimix>, + <&pgc_hdmimix>, <&pgc_hdmi_phy>, + <&pgc_hdmimix>, <&pgc_hdmimix>; + power-domain-names = "bus", "irqsteer", "lcdif", + "pai", "pvi", "trng", + "hdmi-tx", "hdmi-tx-phy", + "hdcp", "hrv"; + #power-domain-cells = <1>; + }; }; aips5: bus@30c00000 { From patchwork Sat Feb 3 16:52:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544310 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 0CF5CC48291 for ; Sat, 3 Feb 2024 16:54:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 32A2910EA08; Sat, 3 Feb 2024 16:54:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WpxgNQGH"; dkim-atps=neutral Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) by gabe.freedesktop.org (Postfix) with ESMTPS id 066AA10E9F6 for ; Sat, 3 Feb 2024 16:54:04 +0000 (UTC) Received: by mail-il1-f179.google.com with SMTP id e9e14a558f8ab-3639aa6a54fso10651835ab.1 for ; Sat, 03 Feb 2024 08:54:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979243; x=1707584043; 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=JtGhKs15Hj8i5RJ5ho6JwLU0TmKEm52r/T9AweQyD3U=; b=WpxgNQGHmuuRi7M7APWEihbCfnRMY7B72017WybZLkrV9ZmXfoVVatyLwGeo8zzr2p 4fqmCh8JssDb83MvEdDGnVTRiMno3SKgtUIMXDBIYvQHTjGLngV5NKoppl96hYmNJa/R y57KFDK2VVgJb3P1A5pzMHAko7Vt0p4Xn8tcC0M1ZPZc3tFgwIz0GEgrOIWAJF6iQCWA FVx8w0K/mcrQmPkFkYe/uslHCPF+im42z8eqXDx4Aebv/5Ghe5vqsUnrqb716kL8vICv CwZ+AYA22RHoR81/quboKDWuXhfA3bxDgTD1xLG/KBszphwU9bafB3G/G4u9Jq1+wRdS krOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979243; x=1707584043; 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=JtGhKs15Hj8i5RJ5ho6JwLU0TmKEm52r/T9AweQyD3U=; b=L7rgE0dWUHPQ/E1vfgHMbCaPruBvLI/vipL51KDiSi6v9wfASV0atEPcSDKYNfy4fi KHZe9zQABShx3Yr9UY5N/064ZgjTmVF9W7O3UORc/1unjMj16yAT6Bi/bQ2wwEKiGyEr VbL5AFSBRp/5Ukm7ASuVg0WPI0C+RYPeTFV4eWHY8XrLR3eojQZ1QunLNMbhwQTeXQdG jmEu6FUGtYgiNKxFqEgjsYOkdo+FVWap/YbTZIrfuu3SFc+erSBeb8DQhbui+IV5Iz/D ZvslTl1+LP9Kpkf7dJnp9JTs7zxV6vSuQ2cdNeFMF22kn3F/FoxOBLouLYOzXxozsJPz IuBw== X-Gm-Message-State: AOJu0YwTiljgP3w1KjLH7vj49TA+XWC1l75PXj8qBf0Cry7RE/NAB6Ok sXXnwgpAnYJA3Ic+C/+E3rMFreMs5mDY8uQAlsurtgatDzyVnQFX X-Google-Smtp-Source: AGHT+IEtUlUuWsf9Gbr9GJbRlc1FEcGkrsmzLVx90UiAKNG3C5GbacaJqKTLB3V+VnaauWFjXUN5Nw== X-Received: by 2002:a92:d3cf:0:b0:363:81df:3d3 with SMTP id c15-20020a92d3cf000000b0036381df03d3mr5301076ilh.4.1706979243145; Sat, 03 Feb 2024 08:54:03 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU/UwDB46wLoYIFz3O6l5HXVdZUTuSGDGGNGDOBmA1nI1v32qlpxeuKPfkKPapsxAKPEyV6GPHaDnimTNr3DbJrYuloAkEnRbdSF2fb4CuRVyDXSHYK2eHAj/DTf82WRn6QOBFR5iwj2elDQNofClJ97c127Khba7hPCHaIlPasYNq2qlgRpAe3cwfen4EiVjlNaH4EfMYkZWjk/HYMl0zDZBa/UgXs6nqfuXwFARAOWRxFGSFfyowwZVJF3kfGTotEIkCx2VRUu5lOCSshBDa2s1TZVeZklv0lOBCQgeq2YYhVWTR0bj49etVariQ5188+WbNbo6s3wS0WDD27C7xTyep7AKf1ozf5xpunMCecoMQIZdeooVqkuvOeAarWQ6LbtFZldbUz1p4tfaiY/RL+R3e0HKdB0SEQfup7eprMSVdd2qtIMqi64bzq74UM3/P4HgBRcZlf16SZeUZ8oGeBnGKvp3E1GToJqiOk8A8K9SyHSsQXKJX/rVYQ/tfwLPDt3RTCtGUJZ7rmlNxDJXZu5etd7fWDAcCIJgiT3rXAlT4YRnFwWtdICYcfItQokTzmrNE5QZXYdSP6oc2uAkMUfqd2rYHvSzQpoi53MwL+SYArEuvYM5+ePpPj0XleBmwr6Q2aWPhEQiNFbT0UJFo9vkFus0VAOYDq4KJSKXXDvtp03Q8q6nfhzdIbf/ty5SeTXaiDo7vGDKgOARera2E+oLcjiw2QSr+7HzADqONxj94o8TWoUIjFN/+o6mvZbmaT5dwL95LBBD48M0cEGfDvHAF9Q6eaPC1CthonwR93ceLtw5fmr1u4ReEB9ENscdoRdfFjzMp26HdZhHmF7Kwb2AVHcafwsOLyjSdRUgGR2Ystz8uLQGuHxLwwS/pViR3hkiRxruq+4cKnGxmOnLyOgIUOL1Z93q2KFjHW9hJ9d0ntICMUPEbe4O/xrJzko/4NAo zKTMm/HRtldmfyvTUtcKEXGp1JpMp5rUj4zBHe5CyHWYwb8SeNSFH+sXwQPOBCSupIPgOw3CnTspR5lOggwYfaNWyhC7GD4aoUU0Irb4Dj7KPDYSGx7gRih9Mw4rrejlDGk57IACnM1O8zQE8s/o48ubKXEXq0CzXFZbAioDyJSkJ4R4u613NpycCar9bMYqVgC10= Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.53.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:54:01 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Lucas Stach , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 06/12] arm64: dts: imx8mp: add HDMI irqsteer Date: Sat, 3 Feb 2024 10:52:46 -0600 Message-ID: <20240203165307.7806-7-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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: Lucas Stach The HDMI irqsteer is a secondary interrupt controller within the HDMI subsystem that maps all HDMI peripheral IRQs into a single upstream IRQ line. Signed-off-by: Lucas Stach --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 5c54073de615..5e51a766f3d9 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1399,6 +1399,19 @@ hdmi_blk_ctrl: blk-ctrl@32fc0000 { "hdcp", "hrv"; #power-domain-cells = <1>; }; + + irqsteer_hdmi: interrupt-controller@32fc2000 { + compatible = "fsl,imx-irqsteer"; + reg = <0x32fc2000 0x44>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <1>; + fsl,channel = <1>; + fsl,num-irqs = <64>; + clocks = <&clk IMX8MP_CLK_HDMI_APB>; + clock-names = "ipg"; + power-domains = <&hdmi_blk_ctrl IMX8MP_HDMIBLK_PD_IRQSTEER>; + }; }; aips5: bus@30c00000 { From patchwork Sat Feb 3 16:52:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544311 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 DC9FBC48291 for ; Sat, 3 Feb 2024 16:54:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E9B7B10EA3C; Sat, 3 Feb 2024 16:54:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Lon/yWCT"; dkim-atps=neutral Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34AF010EA32 for ; Sat, 3 Feb 2024 16:54:08 +0000 (UTC) Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-7c00128de31so113761139f.3 for ; Sat, 03 Feb 2024 08:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979247; x=1707584047; 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=iN7CHiElDXoarw0CBzFnW/ft9HNctCbMZzIXIZ/bUo8=; b=Lon/yWCTCTV1CMGh1W0yqbkzFG1z07/zjqQfCk2e/51rGPzBFquqxrCeFKSlI3XPZJ AMCfRSH3Y3NkE/y9h65e5OVwsOyhnl0Fj5YShrAUBB6ZrNfq6A7ADZbM4HmQ+4yvy9Pz FnPE2anbeMr9zLvRWsJ9J2VjLTI+Rteeb33U0KHq66RnvWW2tiqOPOXruqDFMkwqUsjK 2F28dsmo+KYqCUUhQ04soyhk9u6d0hVGruCQWaXy99+to1bBdkfXgerP8gqzMoH0UOhx exzIU5eQDZLFtz/c9Jv4pKD6d0afeRbAqKN7gLAYkVoc8r/fhIzMABN+jP0PhluIjm1o nnvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979247; x=1707584047; 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=iN7CHiElDXoarw0CBzFnW/ft9HNctCbMZzIXIZ/bUo8=; b=rf2y8fiBsGVaprt0BIv857/DX6mv3VltyJDLmPdw5Uw+ZABkuL19lgCXZIQA7+vpOl sb5E6Aag3e/7l8cgkAb/Z4p+Tr0UBEdAoFYQdlGUgDXBze4BoVV8B3OK2ypohj9sLviB 8x9iNrkeMuD91qFmvqkWAyPgxHkyFI8Wgw7a/Tc1k2Hpxzy6yyBpvUbKlp/S48d44i8J VTw1BP9uWUcLkl+rMxknKOGnZeJSJIX5hs9h/+PFhVfPbfaTtalenK8xLPECcANiMTsX XeugGM9vqzmv2EWn9fDKkAlJFBta9HTlX9uOjH5DFQnxwemw++jIAKrB4f6vcAf4WdTo KrSw== X-Gm-Message-State: AOJu0YzBL4GHI2QhP6EnXK55n1WsgD5IPeL60F1ju7EU2Odm7GuTlmWS aFkhR+++YdJKcmIh1wYG6rJeatroc1FgwLuDJ62Wa8SRXMgT+okW X-Google-Smtp-Source: AGHT+IHF9zh6CYjYVL5XR4aOsuCz2JWMZKXEuAxJLr9Xj8pwzfzLUwChQP/CnjWMh7hRgUYvMP22WA== X-Received: by 2002:a5e:d915:0:b0:7bc:3cb7:b68b with SMTP id n21-20020a5ed915000000b007bc3cb7b68bmr9293261iop.17.1706979247353; Sat, 03 Feb 2024 08:54:07 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVWZ3cE3qI9Oj54mFr3sAnVJXSwCFl8jEzpL9ucr/wb7wJtIiD8UuODjyzAMUp0ByTuWPWRCY3gFUaj6Tl1QSSEoFmjcqHnSIJm/CcYV2fBCR2TzZs6oMwGgz5yIoAFA319P7Cu/VvHvowXSFkPvrNG9Nk/p1zhIlaMWQVBz3OSXWpNjQTYmfW/BQolQDULLpBgKPdzTdQSV0JBqGa3HHFXp7F4tkWXzXv1y6RIxVcEbZ3kiXP0iTHuyLXiXyDE4oE+kWbIvORuO/pbkidoXGyPiHMTqHlcHCP6RyLAHu+WtrTwo+g1+tIBsqmnd3WPmnxcuegvPP95EWGHrYIdQSQ5Idbi4CwazuUWx2XpS24CfIaw8kbQLVFgOMCHdlhz9Pvz9XROrEFXVxzlJ1bvLegZgn8gzI1xXH9W9HOzuq1PMFioWzwvJdcCATyJeg2qPCZ0qZmHTBpt4mrW4zoAK/0TSwlUiG4XVET3T0cSJu0+3pOg4A8dzMvmlv9bwJT/FzSWVlGCyECr0tPGwNLcgv5hJ6a0E9vBLE0gA+Zuo671skr3tDr+otnlIdQfBv84iJVTiq/BagoTPx5fjx91RezHWRZi4PLpR88/htGeuFRZKJmoFIW9O+A0i1CMkwW+tpboQCIaRk8nL/tEsGc5GwTjAYBBAYnxrTMIYXQe6J1iCDjMHb50yy0ys1CsDDDN9O/57CQQ4yNiXYw57qtRvh6wglVsdEk2/o9OSlbUtzmv5X+RKM6+Jo5v6ACtTp/2R3Kb5XJX8DBNHt8MLEpAE6H0oiw7YZMxPMfrqUrsQx0rM+vHkHSPYfqbFKv6kSt+4S7NC61JYbp/haR+aVmsLSl9dfvWtwtdXMop/gIejD9oK83qBw6/OQfe3Qd2eZvpRGa7q+KETghsHfoNPq9ANbXAHYAP1lzUKelCh9KJtcEdUT0G9eyxTOPnnWm++V0vH82B46 Op9yK3+Tazd+mB0eyGk7bUQiVbqEL1o+LnXA3pkY2OhBG/HNhjdGW/YhvFGDeSNAwHjh81LUNI122dg4+sDdF5D0ZfPnEwslU0jnCcOQ0rvvfxkXCjqSo0ypjOan2P0+R1Xtrho+l5/mS7NurD/WMxlLi/NHZGM3zN7RAGATKJEfT+oXCbdVquZgIBh5CsV6bN3/B7/E+jpc2JhNIVIy0qd4W//NRD7kGqGSt3b/48KAOc5HsaYPhWjAAPDDbPhE9SKMsAJIWwu5h+hYv8VkCh9cO6E/9aUkv7S+j0YQdt1N2R21dDVg== Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:54:06 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Lucas Stach , Laurent Pinchart , Conor Dooley , Adam Ford , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 07/12] dt-bindings: display: imx: add binding for i.MX8MP HDMI PVI Date: Sat, 3 Feb 2024 10:52:47 -0600 Message-ID: <20240203165307.7806-8-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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: Lucas Stach Add binding for the i.MX8MP HDMI parallel video interface block. Signed-off-by: Lucas Stach Reviewed-by: Laurent Pinchart Reviewed-by: Conor Dooley Signed-off-by: Adam Ford Reviewed-by: Luca Ceresoli --- V8: Add interrupt-parent V7: No Change V6: Add s-o-b message for myself (Adam) V5: I tried to help move this along, so I took Lucas' patch and attempted to apply fixes based on feedback. I don't have all the history, so apologies for that. Removed the pipe character from the Description. Increased the register size from 0x40 to 0x44. --- .../display/imx/fsl,imx8mp-hdmi-pvi.yaml | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8mp-hdmi-pvi.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8mp-hdmi-pvi.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8mp-hdmi-pvi.yaml new file mode 100644 index 000000000000..56da1636014c --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8mp-hdmi-pvi.yaml @@ -0,0 +1,84 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8mp-hdmi-pvi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8MP HDMI Parallel Video Interface + +maintainers: + - Lucas Stach + +description: + The HDMI parallel video interface is a timing and sync generator block in the + i.MX8MP SoC, that sits between the video source and the HDMI TX controller. + +properties: + compatible: + const: fsl,imx8mp-hdmi-pvi + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + power-domains: + maxItems: 1 + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Input from the LCDIF controller. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Output to the HDMI TX controller. + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - interrupts + - power-domains + - ports + +additionalProperties: false + +examples: + - | + #include + #include + + display-bridge@32fc4000 { + compatible = "fsl,imx8mp-hdmi-pvi"; + reg = <0x32fc4000 0x44>; + interrupt-parent = <&irqsteer_hdmi>; + interrupts = <12 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&hdmi_blk_ctrl IMX8MP_HDMIBLK_PD_PVI>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + pvi_from_lcdif3: endpoint { + remote-endpoint = <&lcdif3_to_pvi>; + }; + }; + + port@1 { + reg = <1>; + pvi_to_hdmi_tx: endpoint { + remote-endpoint = <&hdmi_tx_from_pvi>; + }; + }; + }; + }; From patchwork Sat Feb 3 16:52:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544312 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 E9898C4828F for ; Sat, 3 Feb 2024 16:54:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D00110EA3E; Sat, 3 Feb 2024 16:54:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YpDm/HNz"; dkim-atps=neutral Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id C0AE510EA32 for ; Sat, 3 Feb 2024 16:54:12 +0000 (UTC) Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7bf0f3bf331so130811939f.3 for ; Sat, 03 Feb 2024 08:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979252; x=1707584052; 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=nS1U6CsEeokUdAK6p14gWlLI/p7zyPtTy5BLbUv6Q3Y=; b=YpDm/HNzIta9LzuUgh7Z3j8N4TykidmgXHxg8BEK0S9vWzINjOQwUey4T9t7ADtuIb xEaYqhDRiOfTrCSEmVB8OPkUl4u11Xijity9xVYqbjs7m2y0+t06rZuDqtxpqErEyjZu UoEQMRBZOYuY1/puYVrb+EO9/RLpKFrsv9+tFESOZtNGZF/6voVPW+Va7/qa2b/TCA2v ZBZNdBdPQofkjqADEo8yAqscXw/jwGOuSh+YFB0uGljIhmsrpWMH4vYpsLgq1j/WmZWY TquQLFQcHx7cjAvA7+xLH4e0tEHC1y+fSIOpBF6uPO736brmN41yYvVwnSzKPkEv9gRD IdTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979252; x=1707584052; 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=nS1U6CsEeokUdAK6p14gWlLI/p7zyPtTy5BLbUv6Q3Y=; b=bKIprM3BUKErLCiv8O8TazjjO+p9vONq3/k4QFN0OvCQsSqZIO7XJRbOrj/T4UVOIJ +XQjZaZThdYYANaPogYj6qd+IgALwH1LsYICd47cLMfLl0gKZWB7eUKG5LFJt0lBcMy0 TXfdVELNLwAECkXgo+uLDzAu0NJCevmLMhQrw7KDbdG0jpfLQjvsnwBfb9/hBS/hiO4X QfAYaipVS8zv/1TG8usOd8di0n1z4iOCsnpg2GEyRLBbKkgEEgq5a85aefavGOb5+klU QF8rRkwUAV96S5f5VRI9e60idLOPrYWdDyc81BDEdxvGK3h366YXIZ50o5FHpNrR6096 Bfhg== X-Gm-Message-State: AOJu0Yx4jpQJ/avPFI7NPqeqpXXeoaHhz+EsSnXmoPqUSVOf5++69TQv mae95YSAuNbe+jqSFrW60SM20HwySEP4tbrzdZGWVg4EyVDNtfph X-Google-Smtp-Source: AGHT+IFrrWdkMpDl5OZYBiBfbxaXp3K9xnVbfleGcTWpBuTBqAMQ2JwvReCiRUHRHQTm8YfOKToKsQ== X-Received: by 2002:a5e:dc43:0:b0:7bf:da4d:3477 with SMTP id s3-20020a5edc43000000b007bfda4d3477mr12909894iop.9.1706979251851; Sat, 03 Feb 2024 08:54:11 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWtJ3htmPbVibzr6e+4lQlOltg/gjP51UEUwO3KrmFljhhl5pWMKK9VZbywdm8qKxEksEtRtyXaaABe21u/XY9kBnWNeb5ACbwKIezVpe0uAKNNmNZgOrvuPFe4/yko2uwZuaX9ZuRnZEI9ZIZ2doxFNAIAio5aIxeOUm+jS+3hSf6OEkxpi5vGiCS3HUdmWtdwYI13pfK/d2iOyC5IQ6z1dDC70AKp1GY/udpFYQgJg1u3dUh+a3S1VrO2f0mCa/9FoNbBOE6GFbK+/jpZdVPAm7X6Mt0ytgwUbVGQ//znjDMQjA/3BA5QFN4V8+C6Nb/G2uYtH3vZa3oT3hIcRGUzREv0DaqhJkpzarzCjD3iICg+QPOqF7r3eFHuZWgfSE2p/xBckhEuaN5fC/2dr8ljB1uNBxClNLEZHNlAVWJ8Xu1sToM550SOvB1bC1SEm3OXmqqq2QxAdWZv/Y/XCpRdt8+2vFj8t+OagQCXbFco6V+2BJoWnEyTC6bkx5OwE5IALra9l7gE8X4+wQscveFtdwVltDcGq8pH+cBIQAQH6PH/jo6Om/3gRdmX3o6Uq1EzRcNLuXjO4bZj1x5Ej+/IG+lkIakEzBlaMC9lW2ydCYDEV98g+V/tGaQEXPZSuTMJbsm8OuUYJWTee7ZADdRYIJuRlKbHE2qPUL5ZjFyBi0j9iagnpEjKj6MNIx6EBwe76JTUK78e5FcC2jwU4Q54jSi1z7cI1CRHoO+RoeGm5Ef9jnBy5YNhKoFGdZYVrL0A8pjzWmj1FJ07W1MGA8phDBWUgtV6E5kIZ+gyVMD/qCn0Q//t1mYVOFGBmzRNRJE4rb+xvOPafqyZyhj0z2F9ALYwuEX9685QpY1zJC364Gw614rVX/42vo/LBf5t39N/W9WHQQyfitVcqxh7Ee5YkoRC7ge7Bc2TcVKymG4AcEd29eO/Ad8rS+9wVeOR4/nSO1 AA2DxDnPtlcFS0Uyl6gXJ1pvSU98BPb9FuhJT+wtGQECFTYIRCCD3l7aUl7tb+dZIlTSWSRaTECmYXgD/n1twe3NLsnAHnOTOKcsN9mXTPv05Y6ZXEyah6i8LRal+ZShTupWEfcW69K7yX+6l1UNwMboVQ+Qr1kLob2n9LFgMYeF2OHD77j1eU8+rvNJN/WOPn1f2rSD4LS482dhwTTtipgjowm052XOo0JXXEAFIgVIkItlAFuEEbO3beWbvZfBhc5QiXYCsTzs0ovP+HtjWRQOFi3+w8u7msJPr1AFr9wDGdBlmumRUA9ku41IX9jThWYGI6u31VJ7sP9npKHlEJVMo= Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:54:10 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Lucas Stach , Luca Ceresoli , Richard Leitner , Laurent Pinchart , Fabio Estevam , Adam Ford , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 08/12] drm/bridge: imx: add driver for HDMI TX Parallel Video Interface Date: Sat, 3 Feb 2024 10:52:48 -0600 Message-ID: <20240203165307.7806-9-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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: Lucas Stach This IP block is found in the HDMI subsystem of the i.MX8MP SoC. It has a full timing generator and can switch between different video sources. On the i.MX8MP however the only supported source is the LCDIF. The block just needs to be powered up and told about the polarity of the video sync signals to act in bypass mode. Signed-off-by: Lucas Stach Reviewed-by: Luca Ceresoli (v7) Tested-by: Marek Vasut (v1) Tested-by: Luca Ceresoli (v7) Tested-by: Richard Leitner (v2) Tested-by: Frieder Schrempf (v2) Reviewed-by: Laurent Pinchart (v3) Reviewed-by: Luca Ceresoli Tested-by: Luca Ceresoli Tested-by: Fabio Estevam Signed-off-by: Adam Ford --- V8: No Change V7: Re-do some includes to address build issues after rebasing from Linux-next V6: No change. V5: I (Adam) tried to help move this along, so I took Lucas' patch and attempted to apply fixes based on feedback. I don't have all the history, so apologies for that. No changes from V4 to V5 --- drivers/gpu/drm/bridge/imx/Kconfig | 7 + drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c | 207 +++++++++++++++++++ 3 files changed, 215 insertions(+) create mode 100644 drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig index 5a4f3d58501e..a4d13331e320 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -3,6 +3,13 @@ if ARCH_MXC || COMPILE_TEST config DRM_IMX_LDB_HELPER tristate +config DRM_IMX8MP_HDMI_PVI + tristate "Freescale i.MX8MP HDMI PVI bridge support" + depends on OF + help + Choose this to enable support for the internal HDMI TX Parallel + Video Interface found on the Freescale i.MX8MP SoC. + config DRM_IMX8QM_LDB tristate "Freescale i.MX8QM LVDS display bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/imx/Makefile index 2b0c2e44aa1b..e2c2106509fa 100644 --- a/drivers/gpu/drm/bridge/imx/Makefile +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_DRM_IMX_LDB_HELPER) += imx-ldb-helper.o +obj-$(CONFIG_DRM_IMX8MP_HDMI_PVI) += imx8mp-hdmi-pvi.o obj-$(CONFIG_DRM_IMX8QM_LDB) += imx8qm-ldb.o obj-$(CONFIG_DRM_IMX8QXP_LDB) += imx8qxp-ldb.o obj-$(CONFIG_DRM_IMX8QXP_PIXEL_COMBINER) += imx8qxp-pixel-combiner.o diff --git a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c new file mode 100644 index 000000000000..a76b7669fe8a --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-pvi.c @@ -0,0 +1,207 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* + * Copyright (C) 2022 Pengutronix, Lucas Stach + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define HTX_PVI_CTRL 0x0 +#define PVI_CTRL_OP_VSYNC_POL BIT(18) +#define PVI_CTRL_OP_HSYNC_POL BIT(17) +#define PVI_CTRL_OP_DE_POL BIT(16) +#define PVI_CTRL_INP_VSYNC_POL BIT(14) +#define PVI_CTRL_INP_HSYNC_POL BIT(13) +#define PVI_CTRL_INP_DE_POL BIT(12) +#define PVI_CTRL_MODE_MASK GENMASK(2, 1) +#define PVI_CTRL_MODE_LCDIF 2 +#define PVI_CTRL_EN BIT(0) + +struct imx8mp_hdmi_pvi { + struct drm_bridge bridge; + struct device *dev; + struct drm_bridge *next_bridge; + void __iomem *regs; +}; + +static inline struct imx8mp_hdmi_pvi * +to_imx8mp_hdmi_pvi(struct drm_bridge *bridge) +{ + return container_of(bridge, struct imx8mp_hdmi_pvi, bridge); +} + +static int imx8mp_hdmi_pvi_bridge_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) +{ + struct imx8mp_hdmi_pvi *pvi = to_imx8mp_hdmi_pvi(bridge); + + return drm_bridge_attach(bridge->encoder, pvi->next_bridge, + bridge, flags); +} + +static void imx8mp_hdmi_pvi_bridge_enable(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state) +{ + struct drm_atomic_state *state = bridge_state->base.state; + struct imx8mp_hdmi_pvi *pvi = to_imx8mp_hdmi_pvi(bridge); + struct drm_connector_state *conn_state; + const struct drm_display_mode *mode; + struct drm_crtc_state *crtc_state; + struct drm_connector *connector; + u32 bus_flags, val; + + connector = drm_atomic_get_new_connector_for_encoder(state, bridge->encoder); + conn_state = drm_atomic_get_new_connector_state(state, connector); + crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc); + + if (WARN_ON(pm_runtime_resume_and_get(pvi->dev))) + return; + + mode = &crtc_state->adjusted_mode; + + val = FIELD_PREP(PVI_CTRL_MODE_MASK, PVI_CTRL_MODE_LCDIF) | PVI_CTRL_EN; + + if (mode->flags & DRM_MODE_FLAG_PVSYNC) + val |= PVI_CTRL_OP_VSYNC_POL | PVI_CTRL_INP_VSYNC_POL; + + if (mode->flags & DRM_MODE_FLAG_PHSYNC) + val |= PVI_CTRL_OP_HSYNC_POL | PVI_CTRL_INP_HSYNC_POL; + + if (pvi->next_bridge->timings) + bus_flags = pvi->next_bridge->timings->input_bus_flags; + else if (bridge_state) + bus_flags = bridge_state->input_bus_cfg.flags; + + if (bus_flags & DRM_BUS_FLAG_DE_HIGH) + val |= PVI_CTRL_OP_DE_POL | PVI_CTRL_INP_DE_POL; + + writel(val, pvi->regs + HTX_PVI_CTRL); +} + +static void imx8mp_hdmi_pvi_bridge_disable(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state) +{ + struct imx8mp_hdmi_pvi *pvi = to_imx8mp_hdmi_pvi(bridge); + + writel(0x0, pvi->regs + HTX_PVI_CTRL); + + pm_runtime_put(pvi->dev); +} + +static u32 * +imx8mp_hdmi_pvi_bridge_get_input_bus_fmts(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state, + u32 output_fmt, + unsigned int *num_input_fmts) +{ + struct imx8mp_hdmi_pvi *pvi = to_imx8mp_hdmi_pvi(bridge); + struct drm_bridge *next_bridge = pvi->next_bridge; + struct drm_bridge_state *next_state; + + if (!next_bridge->funcs->atomic_get_input_bus_fmts) + return 0; + + next_state = drm_atomic_get_new_bridge_state(crtc_state->state, + next_bridge); + + return next_bridge->funcs->atomic_get_input_bus_fmts(next_bridge, + next_state, + crtc_state, + conn_state, + output_fmt, + num_input_fmts); +} + +static const struct drm_bridge_funcs imx_hdmi_pvi_bridge_funcs = { + .attach = imx8mp_hdmi_pvi_bridge_attach, + .atomic_enable = imx8mp_hdmi_pvi_bridge_enable, + .atomic_disable = imx8mp_hdmi_pvi_bridge_disable, + .atomic_get_input_bus_fmts = imx8mp_hdmi_pvi_bridge_get_input_bus_fmts, + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_reset = drm_atomic_helper_bridge_reset, +}; + +static int imx8mp_hdmi_pvi_probe(struct platform_device *pdev) +{ + struct device_node *remote; + struct imx8mp_hdmi_pvi *pvi; + + pvi = devm_kzalloc(&pdev->dev, sizeof(*pvi), GFP_KERNEL); + if (!pvi) + return -ENOMEM; + + platform_set_drvdata(pdev, pvi); + pvi->dev = &pdev->dev; + + pvi->regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pvi->regs)) + return PTR_ERR(pvi->regs); + + /* Get the next bridge in the pipeline. */ + remote = of_graph_get_remote_node(pdev->dev.of_node, 1, -1); + if (!remote) + return -EINVAL; + + pvi->next_bridge = of_drm_find_bridge(remote); + of_node_put(remote); + + if (!pvi->next_bridge) + return dev_err_probe(&pdev->dev, -EPROBE_DEFER, + "could not find next bridge\n"); + + pm_runtime_enable(&pdev->dev); + + /* Register the bridge. */ + pvi->bridge.funcs = &imx_hdmi_pvi_bridge_funcs; + pvi->bridge.of_node = pdev->dev.of_node; + pvi->bridge.timings = pvi->next_bridge->timings; + + drm_bridge_add(&pvi->bridge); + + return 0; +} + +static int imx8mp_hdmi_pvi_remove(struct platform_device *pdev) +{ + struct imx8mp_hdmi_pvi *pvi = platform_get_drvdata(pdev); + + drm_bridge_remove(&pvi->bridge); + + pm_runtime_disable(&pdev->dev); + + return 0; +} + +static const struct of_device_id imx8mp_hdmi_pvi_match[] = { + { + .compatible = "fsl,imx8mp-hdmi-pvi", + }, { + /* sentinel */ + } +}; +MODULE_DEVICE_TABLE(of, imx8mp_hdmi_pvi_match); + +static struct platform_driver imx8mp_hdmi_pvi_driver = { + .probe = imx8mp_hdmi_pvi_probe, + .remove = imx8mp_hdmi_pvi_remove, + .driver = { + .name = "imx-hdmi-pvi", + .of_match_table = imx8mp_hdmi_pvi_match, + }, +}; +module_platform_driver(imx8mp_hdmi_pvi_driver); + +MODULE_DESCRIPTION("i.MX8MP HDMI TX Parallel Video Interface bridge driver"); +MODULE_LICENSE("GPL"); From patchwork Sat Feb 3 16:52:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544313 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 2A130C4828D for ; Sat, 3 Feb 2024 16:54:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B28510EA43; Sat, 3 Feb 2024 16:54:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kWsYYXK2"; dkim-atps=neutral Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id 082D010EA43 for ; Sat, 3 Feb 2024 16:54:20 +0000 (UTC) Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-7bf0f3bf331so130815539f.3 for ; Sat, 03 Feb 2024 08:54:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979259; x=1707584059; 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=iHK4uYY3PEuLbfB443xySfJh6mTWFIfLyC9ZOn+YSEA=; b=kWsYYXK2VFx5MGOwFH6l73ABzxPMc02zTT2sJUf4Gp5t8KdpzLDSSYEq0dJH8CE9Rn UNAHSbVpncaU7PZbsIXdpKAwF4Q7hZkkBp7MAuWLU0baGU1UMo1IlrXW1wOXm9O1fLeC dLdZkhj8yrjIPiny90RF0VHt+Z2i4XQwwlsMvWlCjO5x4OVet2APaomKzA/O/9pdcnso yvYiaPlHjn0Mt5Re0oMfYNhl+im3d5XZCHLt05lHYh0WgMoCdysQ0hhiNYG2nAjbLx9S Vp/BJXRyHHi7VFym/f/fztvcM6Bss8Ozx6e7Ze4aBjmxAcBGBqTrbB0B4Nl7nKHlEfyd 79nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979259; x=1707584059; 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=iHK4uYY3PEuLbfB443xySfJh6mTWFIfLyC9ZOn+YSEA=; b=t0fVCz5tw3gmrKhuce9U8COXc3GLj7AhSi+7/HW/Hu0SjhSeOH2SwHOuOudlqCA0CL AyPq/KznpEep5nQLHc3ALNLRH2h9K5x5/xgSdEeT0HmPpOTQUcYW18v6O8rwQKrdNOZU HNnakvE8pb8HDFU9A2YL7HncngTsbdVuR7on10q+bRZGJ1JGe8ZIjnVT2BLRhvAw0QQB LSHeFimj2q0NawH/qVxcRWnsIDkqBwHKnT9vPm4bF4kUsxUlotGgIo7szYpSMz+BYBNt 0NlvZGztlMY2vOl7Oqev5HEzpg9Bhvobm0wwR4EOHz9TAn5Vywb2nHaPrz8qTmeipC4r jteQ== X-Gm-Message-State: AOJu0YwGuDHWsG9cxtzbn5u5THyRMo39mfnn4Y6XyWwKQnCucTStfneC nU+rJRl5IYX+hr5qthlZTqj0tjeNFpAO6WDDz6TRcFiYNU/lendd X-Google-Smtp-Source: AGHT+IH5DzrelkZeUzQOrbkI+GctzSKGfiIH9RZE+YFrVkDU00cTd2CRzJq//djvwBf6b1rrDqsQQQ== X-Received: by 2002:a6b:5819:0:b0:7c0:409e:e3c5 with SMTP id m25-20020a6b5819000000b007c0409ee3c5mr5574885iob.19.1706979259164; Sat, 03 Feb 2024 08:54:19 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXyOusTxAlEpAGlVDzNppwPsOqKckjm7lzwaCDbk6BJXWppLX7luv3fv5T0RSa5IzcdTQ7VwdHiKJ+0mT3b+ebzMbtut5OfmBMbUET5BV5ADOvN8uuvTTA5Zpn1ViPvRYwd5UUil8Z3a8lHC7Je0LPNbREzDR7R2vYu5SnvQ0qChXh7IaU8w/1fBVNQvschkCOvUnidyCQi0TMWC+RXvO7Ebcsi9fmLs+1CxyljaOLzlGRfYlsvPL5peem3JM0/HJkIEKuOnO9nDYKPlvD21irh+rwl2ze/t9idOn6BT2hqU5KEsryzAa1k4tgXK/GjW45TPqymEA/GquwctU4VldBwtDY4bDgdx5hEFeZsl6MHjEl2ZfOMazVnqAwiiT+DRVRsO4Zf09i28gfbWNK8P+Guka9VZM6iEYmMnpHpWjpWByNVY3FkuHO16LAfKay0uZUXHZteofRXFMLY2wT1s6xGVjXHGcmg9N7D6T8x2T5DBPYkrLc6sFH+2E1nzEFEFsPsLwkQRL+h87diA7AuIDqFeq4hQzGCAVigzRi5mAAknvFOiNVkOjx2uaVQwurSHvB9d5dT4poievAH/jkGiNaQVRCk152bP4QLPJHLeqzzCu/jr0kFPc25ZbApxcToIHcHzjM1Pmn5DMF2mxDpc8IUXuVwNWgT7ZE7mpovYvyq7jGeaB2Z0mcIjMcXpcIZoqWaOx8VagivoUmpGMNMGa21eG8+Vdv+aVlwN0l8LmzkkNamRwKTM4g7B6dwMlMC9MNnIrRDVF8rb0ja5kx43Ifwy8lCIi7AONLkciGw1dVR9+UEpO4KuKNm67CEzvCrxykvmAI6d8BB0efxYQ6e1Pl29sXmpXT/z/+Dse0auIzT4H0FQfEkO//4htSCy6oliv6omAsMZMMRr9Wj9gwrH/m+0w1QjRghCkiySHtI6eeBdwEw7rM58x1bBZCnKJSgfsQXw0 sfJvvq0jKffalZMFTlDiHXwfsmaWZZguesYFTHSgC6j4BAOBu0KcNqADA3m2HqTp9nv/g7kGB1gY7aNY6cYj1YLFrcTePHBl8NLNtrtgczP2D8Y2E7mlOCEJJI4ebctHmnH1pZjWQU95luF1YCMOHFedMkYepuL5oIUOTukmoCI3x5cMy40sPwXlNqk2aF22Fodwztf824P6ccxmWCriu5UxydYuzgSw== Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:54:15 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Lucas Stach , Adam Ford , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 09/12] dt-bindings: display: imx: add binding for i.MX8MP HDMI TX Date: Sat, 3 Feb 2024 10:52:49 -0600 Message-ID: <20240203165307.7806-10-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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: Lucas Stach The HDMI TX controller on the i.MX8MP SoC is a Synopsys designware IP core with a little bit of SoC integration around it. Signed-off-by: Lucas Stach Signed-off-by: Adam Ford Reviewed-by: Rob Herring Reviewed-by: Luca Ceresoli --- V3: Change name and location to better idenfity as a bridge and HDMI 2.0a transmitter Fix typos and feedback from Rob and added ports. --- .../display/bridge/fsl,imx8mp-hdmi-tx.yaml | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/fsl,imx8mp-hdmi-tx.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/fsl,imx8mp-hdmi-tx.yaml b/Documentation/devicetree/bindings/display/bridge/fsl,imx8mp-hdmi-tx.yaml new file mode 100644 index 000000000000..3791c9f4ebab --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/fsl,imx8mp-hdmi-tx.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/fsl,imx8mp-hdmi-tx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8MP DWC HDMI TX Encoder + +maintainers: + - Lucas Stach + +description: + The i.MX8MP HDMI transmitter is a Synopsys DesignWare + HDMI 2.0a TX controller IP. + +allOf: + - $ref: /schemas/display/bridge/synopsys,dw-hdmi.yaml# + +properties: + compatible: + enum: + - fsl,imx8mp-hdmi-tx + + reg-io-width: + const: 1 + + clocks: + maxItems: 4 + + clock-names: + items: + - const: iahb + - const: isfr + - const: cec + - const: pix + + power-domains: + maxItems: 1 + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Parallel RGB input port + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: HDMI output port + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - power-domains + - ports + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + hdmi@32fd8000 { + compatible = "fsl,imx8mp-hdmi-tx"; + reg = <0x32fd8000 0x7eff>; + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk IMX8MP_CLK_HDMI_APB>, + <&clk IMX8MP_CLK_HDMI_REF_266M>, + <&clk IMX8MP_CLK_32K>, + <&hdmi_tx_phy>; + clock-names = "iahb", "isfr", "cec", "pix"; + power-domains = <&hdmi_blk_ctrl IMX8MP_HDMIBLK_PD_HDMI_TX>; + reg-io-width = <1>; + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + + hdmi_tx_from_pvi: endpoint { + remote-endpoint = <&pvi_to_hdmi_tx>; + }; + }; + + port@1 { + reg = <1>; + hdmi_tx_out: endpoint { + remote-endpoint = <&hdmi0_con>; + }; + }; + }; + }; From patchwork Sat Feb 3 16:52:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544314 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 6AAA2C4828F for ; Sat, 3 Feb 2024 16:54:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82F3C10EA4D; Sat, 3 Feb 2024 16:54:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="A8avve5c"; dkim-atps=neutral Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5A32E10EA4D for ; Sat, 3 Feb 2024 16:54:24 +0000 (UTC) Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-363a7ba0b8aso10112285ab.0 for ; Sat, 03 Feb 2024 08:54:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979263; x=1707584063; 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=Pee85pXx8M9QJJ/rvdrRgJpwO1Us9mIqzBO/JdTu/x0=; b=A8avve5cumQ9hQfNtP4mTuEnumTShh7LW2VHyX7iPguUJj/AZjYaStpuAHzbafydpf DF8Z1BHluGFCzQeUZJEfFu5DDNZtF7Aj7r8WUTSC+rXu4HJOa0FML7SWDYgr/RbjmtH4 Nq1zpAiz7sFTvFiuiDYAf4TkfivgyCDBTOLYX/I5df6tWVmCTaixacy1Bpf04gKnA66G dNiWU07xFtg9L0rp4uw27vK9YK8q1KZNEpSJGltoxgiPzEHA4BzcJYufewbm2oA1hwSJ GxvK1MffHpdFKi3NijB4YvJmlptFRzrZxwf6Gh/8iN+C9PgMt+8+73HPiIPgnZxNKUtD L9TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979263; x=1707584063; 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=Pee85pXx8M9QJJ/rvdrRgJpwO1Us9mIqzBO/JdTu/x0=; b=WyY86MmElV1AxnJCUBBU4lmYmC3aHFJxhhUA0eMOQB8I/mV3xofPZCX6jhgNxQmkOm IBBZkjSAOaZsvnLPzJyH5WDQtEwhxesGoHtXsa7vx3cANEjUY3dtqXw/qB297uWweAU+ pnjZJHjjN2wD4ekgWtwUDWhkp2gyEVUrOSHVlMgz1hY0D8kmrbVngq5l4kGlyATImJ9H ogN2Up/UpxokSf1HGPIAhiHVAssez4pmpm0PXtwiF3BiPqZRRic78LdTNBoVt2NLx+9K xwMnRXBr4soqiJxjm9Iz2gmgOcMryCmBccKM54BEOGezqn4IjimJzHPIYwbbcDW3DG4f /pCg== X-Gm-Message-State: AOJu0YxJ/I4Fgq2PeBBsRQfymeA/ydKg9bUsLoo3k7yHcxFzKu6QzScA OBqUREia/i6hk0M1c+UYMj+4Hxpt+LExhA+IvKaswk3p72TBEWnh X-Google-Smtp-Source: AGHT+IHRFQgHaPOvu2q/tkWyDuGYDcTayUKcocuvucQwCdhjRkYOMCll5WxoIGddaWvUvS92td8dQA== X-Received: by 2002:a92:c5ce:0:b0:363:6da9:2bc3 with SMTP id s14-20020a92c5ce000000b003636da92bc3mr5239097ilt.11.1706979263479; Sat, 03 Feb 2024 08:54:23 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVTi8yyqyf2Habkk9tyCJoPOe9LH5AypnN3NhPkjbPVJALV182rjeRxj4FycC5oyDOecYqR50/JvNFZONhmnUrRWETF5iMlz7YUC4uJUCjOoQObjV6exynOq8X0pQhyNU+pMLtpwMtGsedHX9Z+XeaP1fuuoZ3E4V1EqM3Xw7Yik/SElx47SV21Kar6w86hZQ8JIvRSerSIxojL5fmtbOBJxCqbfm9ZWJ6a2cRemiaqExR+Yu1EZFFARQHk1eR8K6OQ4P0ON2Na9j3f/p0WkN5/ulAWeddoeYpFdUiUX9BfPYrBOOitBbAIjhHnSEn1JiKlut0e6NaVjtt9ZDQQeZGbYgMS80KWY+xTsDfXpGz9cVXcwD6aLwJutnIfKvDn/S8MVY8n+ZkmoB73UwOIc2JlJjuPAQPq0R5GXWAAiVsozOJVxm10vv0+vhT+aW6a80fzM3cbohBjCT3SyhKXkDJtD6NsGd+2B3Wq0e4f2H58gQbpFBSndPlM77Kg9IOr4MQ9VH2VdcsnqyBPp3bMudL2OrVmUDzH3JB6FLwyKDlHXopoTsws3k+av9arIOACAxyNKdXX79qb3dkp+YYTsiZVxssoQRTjNCMBQ4A4gjN23YClZITcro7eTmcA224dIELgSwMbtR8oWXfAP2GmqWMROgq0QJPEAz9TSjk2WgLgawQaylndaqWGGmu4dSNojrahrpy7G8Iy6SfaxYdcgu4mDbDpBoiczdMVyaEg5HRUHIz+EHHU3jdOsMHjjFtMRy4TCdJAqPyGQB/IEhJGkOR0Ud4Z36O7Qe6HobWA1oPfzuVpwFNqtgn2qK55gIBVR0x03BwTYgtVNYfxEqhbFaEWRFpLUd5g0H7RDGoFo2Pg8KWARudtVCCYhZBrrJKfXs1hisDwrqqoV0fVwPa3MzqFnrU9pmuiY9aYm/zEPKvbgOAzla4d4CRZwdqiIlQJ+gZyGL FuHaml/Lvoe8M8XSpOqi35Zh3SY5nJN5p+lr5fRIWPRnqwRW8/J46pdXlWmSsehsybAFVj2YaMI86ecPzwkDxhedXLL04jMmwTBKJO6HKnb4nZqmXCS8D2BeoVbkaVWgBcH2659KRgFRPREi0p0R56XRef4KO6vajRs4lfZxBX6IQcYWV2d5ruxvBcPc5J76unsLw1wXpoZ69CXegazQBg8Y6nrh07x7obUCecPgn9JYiyn5RzduCgAcPlxRh1DiqzwFA+Kp3SQ1PjLrY1IBGto3RQauywZAZfMQBK9AVxhLH9RZaCvNInmwpvXeMY125E4w45wHgLDaEpNeaRtPWa3QU= Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:54:22 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Lucas Stach , Laurent Pinchart , Adam Ford , Richard Leitner , Luca Ceresoli , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 10/12] drm/bridge: imx: add bridge wrapper driver for i.MX8MP DWC HDMI Date: Sat, 3 Feb 2024 10:52:50 -0600 Message-ID: <20240203165307.7806-11-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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: Lucas Stach Add a simple wrapper driver for the DWC HDMI bridge driver that implements the few bits that are necessary to abstract the i.MX8MP SoC integration. Signed-off-by: Lucas Stach Reviewed-by: Laurent Pinchart Tested-by: Marek Vasut Tested-by: Adam Ford #imx8mp-beacon Tested-by: Richard Leitner Tested-by: Frieder Schrempf Tested-by: Luca Ceresoli Signed-off-by: Adam Ford Reviewed-by: Luca Ceresoli --- v3: To move this along, I (Adam) took Lucas' V2 and attempted to address concerns: Changed name to imx8mp-hdmi-tx Re-ordered includes to make drm come after linux Removed unused variable build warning Removed fdcc clock since it's part of the power domain now set the phy_force_vendor = true Removed comma after sentinel Also added suspend/resume functions from Marek Vasut Configured Kconfig to select the PVI and PHY automatically since the HDMI-tx is useless without the other two components I apologize that don't have the version history prior to V2. --- drivers/gpu/drm/bridge/imx/Kconfig | 11 ++ drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c | 154 ++++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig index a4d13331e320..5965e8027529 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -3,6 +3,17 @@ if ARCH_MXC || COMPILE_TEST config DRM_IMX_LDB_HELPER tristate +config DRM_IMX8MP_DW_HDMI_BRIDGE + tristate "Freescale i.MX8MP HDMI-TX bridge support" + depends on OF + depends on COMMON_CLK + select DRM_DW_HDMI + select DRM_IMX8MP_HDMI_PVI + select PHY_FSL_SAMSUNG_HDMI_PHY + help + Choose this to enable support for the internal HDMI encoder found + on the i.MX8MP SoC. + config DRM_IMX8MP_HDMI_PVI tristate "Freescale i.MX8MP HDMI PVI bridge support" depends on OF diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/imx/Makefile index e2c2106509fa..edb0a7b71b30 100644 --- a/drivers/gpu/drm/bridge/imx/Makefile +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_DRM_IMX_LDB_HELPER) += imx-ldb-helper.o +obj-$(CONFIG_DRM_IMX8MP_DW_HDMI_BRIDGE) += imx8mp-hdmi-tx.o obj-$(CONFIG_DRM_IMX8MP_HDMI_PVI) += imx8mp-hdmi-pvi.o obj-$(CONFIG_DRM_IMX8QM_LDB) += imx8qm-ldb.o obj-$(CONFIG_DRM_IMX8QXP_LDB) += imx8qxp-ldb.o diff --git a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c new file mode 100644 index 000000000000..89fc432ac611 --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c @@ -0,0 +1,154 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* + * Copyright (C) 2022 Pengutronix, Lucas Stach + */ + +#include +#include +#include +#include +#include +#include + +struct imx8mp_hdmi { + struct dw_hdmi_plat_data plat_data; + struct dw_hdmi *dw_hdmi; + struct clk *pixclk; +}; + +static enum drm_mode_status +imx8mp_hdmi_mode_valid(struct dw_hdmi *dw_hdmi, void *data, + const struct drm_display_info *info, + const struct drm_display_mode *mode) +{ + struct imx8mp_hdmi *hdmi = (struct imx8mp_hdmi *)data; + + if (mode->clock < 13500) + return MODE_CLOCK_LOW; + + if (mode->clock > 297000) + return MODE_CLOCK_HIGH; + + if (clk_round_rate(hdmi->pixclk, mode->clock * 1000) != + mode->clock * 1000) + return MODE_CLOCK_RANGE; + + /* We don't support double-clocked and Interlaced modes */ + if ((mode->flags & DRM_MODE_FLAG_DBLCLK) || + (mode->flags & DRM_MODE_FLAG_INTERLACE)) + return MODE_BAD; + + return MODE_OK; +} + +static int imx8mp_hdmi_phy_init(struct dw_hdmi *dw_hdmi, void *data, + const struct drm_display_info *display, + const struct drm_display_mode *mode) +{ + return 0; +} + +static void imx8mp_hdmi_phy_disable(struct dw_hdmi *dw_hdmi, void *data) +{ +} + +static void im8mp_hdmi_phy_setup_hpd(struct dw_hdmi *hdmi, void *data) +{ + /* + * Just release PHY core from reset, all other power management is done + * by the PHY driver. + */ + dw_hdmi_phy_gen1_reset(hdmi); + + dw_hdmi_phy_setup_hpd(hdmi, data); +} + +static const struct dw_hdmi_phy_ops imx8mp_hdmi_phy_ops = { + .init = imx8mp_hdmi_phy_init, + .disable = imx8mp_hdmi_phy_disable, + .setup_hpd = im8mp_hdmi_phy_setup_hpd, + .read_hpd = dw_hdmi_phy_read_hpd, + .update_hpd = dw_hdmi_phy_update_hpd, +}; + +static int imx8mp_dw_hdmi_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct dw_hdmi_plat_data *plat_data; + struct imx8mp_hdmi *hdmi; + + hdmi = devm_kzalloc(dev, sizeof(*hdmi), GFP_KERNEL); + if (!hdmi) + return -ENOMEM; + + plat_data = &hdmi->plat_data; + + hdmi->pixclk = devm_clk_get(dev, "pix"); + if (IS_ERR(hdmi->pixclk)) + return dev_err_probe(dev, PTR_ERR(hdmi->pixclk), + "Unable to get pixel clock\n"); + + plat_data->mode_valid = imx8mp_hdmi_mode_valid; + plat_data->phy_ops = &imx8mp_hdmi_phy_ops; + plat_data->phy_name = "SAMSUNG HDMI TX PHY"; + plat_data->priv_data = hdmi; + plat_data->phy_force_vendor = true; + + hdmi->dw_hdmi = dw_hdmi_probe(pdev, plat_data); + if (IS_ERR(hdmi->dw_hdmi)) + return PTR_ERR(hdmi->dw_hdmi); + + platform_set_drvdata(pdev, hdmi); + + return 0; +} + +static int imx8mp_dw_hdmi_remove(struct platform_device *pdev) +{ + struct imx8mp_hdmi *hdmi = platform_get_drvdata(pdev); + + dw_hdmi_remove(hdmi->dw_hdmi); + + return 0; +} + +static int __maybe_unused imx8mp_dw_hdmi_pm_suspend(struct device *dev) +{ + return 0; +} + +static int __maybe_unused imx8mp_dw_hdmi_pm_resume(struct device *dev) +{ + struct imx8mp_hdmi *hdmi = dev_get_drvdata(dev); + + dw_hdmi_resume(hdmi->dw_hdmi); + + return 0; +} + +static const struct dev_pm_ops imx8mp_dw_hdmi_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(imx8mp_dw_hdmi_pm_suspend, + imx8mp_dw_hdmi_pm_resume) +}; + +static const struct of_device_id imx8mp_dw_hdmi_of_table[] = { + { .compatible = "fsl,imx8mp-hdmi-tx" }, + { /* Sentinel */ } +}; +MODULE_DEVICE_TABLE(of, imx8mp_dw_hdmi_of_table); + +static struct platform_driver imx8mp_dw_hdmi_platform_driver = { + .probe = imx8mp_dw_hdmi_probe, + .remove = imx8mp_dw_hdmi_remove, + .driver = { + .name = "imx8mp-dw-hdmi-tx", + .of_match_table = imx8mp_dw_hdmi_of_table, + .pm = &imx8mp_dw_hdmi_pm_ops, + }, +}; + +module_platform_driver(imx8mp_dw_hdmi_platform_driver); + +MODULE_DESCRIPTION("i.MX8MP HDMI encoder driver"); +MODULE_LICENSE("GPL"); From patchwork Sat Feb 3 16:52:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544315 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 65A9BC4828F for ; Sat, 3 Feb 2024 16:54:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 921C010EB94; Sat, 3 Feb 2024 16:54:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ndgSNv0l"; dkim-atps=neutral Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3BD0F10EA64 for ; Sat, 3 Feb 2024 16:54:29 +0000 (UTC) Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-7bfdbaa135bso133019439f.3 for ; Sat, 03 Feb 2024 08:54:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979268; x=1707584068; 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=xV5GVJAeOV5TOmmqtEiNPh6TTuzFDGGYosrKg+K0ogs=; b=ndgSNv0lQyiAoj6qCUlKKiYW6X7E3+MG2BhmXLwWvVkUh1ati75GONDLWSRL4rWX1A 6PVjKuFipHJU5qFh1O1cLrdu+XkPGeD5ep/mgMDWgb5YgILD8iGWS16b1TCnHvOjABua 3k1J2PZteGMpTf9grxyM1HDQkyy831Uml826nk9sGglEj1RKjqKItE/8586fxZj3tBg5 ZeEx+nXcWanesE1PbjppK0Rjsxu+3PqFpwLx47ganVVTchTijjhMTXnjudanVupxuEK3 G7/2Lc7lpmf3Cm72x8+rWXTTDmMXKwT02WEhtsa2et/2XCTf4Fb/17FaGrLXfWVaAWy9 lKYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979268; x=1707584068; 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=xV5GVJAeOV5TOmmqtEiNPh6TTuzFDGGYosrKg+K0ogs=; b=LIwyQKcS2ivVB1JgwP7XjUq1Bf5513SyeXbJGKkLFL6nKzBiH4Frz2LN1r0f7TTUe8 EyrCdl8uYLSTZuk+1XMdWwiJNRO/dAtO8QvYeY62cR9utIfiF6tLrHiiCl9jOFjDjiMf +QQZaIVZx6/PMtnv5/S5G9/IbaO0PqozNerco13LukV46ikSWXexN7g1E8CCrrjVDwkA /NnqwQOBzb1vUG6dR5+yu9786lp2bu3g/ALMkYLKK3pzD5iuaqLEkjejR5Pcf87E2uAe fUBE2HAUJb2nFJjyGns2t5cglh0EelSsBNI3MPiuSY7nI34YOs+qCjcGRUUkxE11+5WM cYRw== X-Gm-Message-State: AOJu0Yy9nlTSsDO1mJ8AsCDR4tjB2QZsis8XZa9tqUas63mkvZrFVZQg v5BcR0VtvXJXE5LLnZRbqfDRqpWtt/Na7L7HPEdzyDJGib1DinUT X-Google-Smtp-Source: AGHT+IFnDvtXlMmMQMAwllyK2p1O6sOo0/5lgyhi5R6gSBcyqbb6GieWlNuW2+KRpkUDfPvTDFKq0w== X-Received: by 2002:a6b:6e17:0:b0:7c1:b54c:15db with SMTP id d23-20020a6b6e17000000b007c1b54c15dbmr4318249ioh.15.1706979268376; Sat, 03 Feb 2024 08:54:28 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXmqWTm894swln2GDV8F3WEq0djHX3OxF/EqeGpkI7kiPokKS2KcpbgZo/Uut92LTwLhUI6PYbQDh31v+/cFCyk+FJH2smLUK0r/V63WoEXqaD2Cp0aFLb+Hy2N8+QWKvt6x6e6pT0ImqLU9m7LjhQK6aDCCVEbHcYd+SdsbHG1AST5aBMskATXyLHvegi1DtRqOf5M1EjuNqXD1+SyPzdufudg/fCA9qsLiED37rWzRNrj1e2B+xkeiQQOC6iiD6BtQn4BjFCVif3rWMf4ea27VaZ4WGtJw7/2QpKQPpn3scr9XL113hBuZ00WR3QrCR1L9GLav1MBgTDbYEVYTfz0oDB1iGec1YcNnZICfuifQDWEsz+rwno7sL49LLhE6S5YnKbxzPSBW+4yvvRpQrfyjb60E34WzSnUQOcaf6Dv75Z2SduMXvvhVrY5L0NaQ5XEpiF+1ZHVX5cpWqcpK7QdIK3QhV6y2nfJGIznwKDU61GfYW1w6C48a6JGzi/5pxeWexQU/O7lsZ4FPr7CzsUSizXl4QEuQH9hPzT4drBAoA5qm359X+ty9HM68qF10ccyO1npxaJQ1cf5JWCUuZauyXNFz54cAaUsZUjdN3fhgOgErzpiutEPxXwr1GOeeNBmNyDYsPImDEFH46D0NPvt6Jov6X4VLO+Zhmd+N9+XwkSJgPx0eRmT+se+VwAjD0dHBWmQdUlIAZ0fCqF8/mIup/bugxLhtDOm0nCUj5x2nglochi1SjxxVdbIJhjHjc0nVSJNeG2aQ+x23fP7eFf7HcZ3DqBuujqpIYLm1DQwuyIuBfgpAmH9dZlEPegP4DQzDy/HOqkEDdIqO5CSFX8kB5IV/BKnGuhRTIeBo8IHloiulv2DHmwsNH/KTo1zUXvixxQYDmxoqRw+blKfqc5zUCVirPgT/dsqSdbF2f3fN5Dd4MvBmWNqYCboBQj3W0/ris emPfAbHNNRrGK4lwUBOjq5ovieCPN1t2tDrNLQzrfSqo6vMcVv5O2MPoOiYjsYb+O1Yw6xBf18ayT5cS03xuZNTZ9njmDDY9M4kenkI/u19v80u6GvW2R4ehld2ewO1GKmkQwVCNxz2+e9mO3RWYe7tVQ2YtKrYS6EJT+49cK5rnNDdDw1h2T7s/gI4BNHB1tlkK8od3YGs7C7rmiIdVQ/oQhiR5vuQA== Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:54:26 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Lucas Stach , Adam Ford , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 11/12] arm64: dts: imx8mp: add HDMI display pipeline Date: Sat, 3 Feb 2024 10:52:51 -0600 Message-ID: <20240203165307.7806-12-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@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: Lucas Stach This adds the DT nodes for all the peripherals that make up the HDMI display pipeline. Signed-off-by: Lucas Stach Signed-off-by: Adam Ford --- V2: I took this from Lucas' original submission with the following: Removed extra clock from HDMI-TX since it is now part of the power domain Added interrupt-parent to PVI Changed the name of the HDMI tranmitter to fsl,imx8mp-hdmi-tx Added ports to HDMI-tx --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 94 +++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 5e51a766f3d9..e84b4f40e570 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1412,6 +1412,100 @@ irqsteer_hdmi: interrupt-controller@32fc2000 { clock-names = "ipg"; power-domains = <&hdmi_blk_ctrl IMX8MP_HDMIBLK_PD_IRQSTEER>; }; + + hdmi_pvi: display-bridge@32fc4000 { + compatible = "fsl,imx8mp-hdmi-pvi"; + reg = <0x32fc4000 0x40>; + interrupt-parent = <&irqsteer_hdmi>; + interrupts = <12 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&hdmi_blk_ctrl IMX8MP_HDMIBLK_PD_PVI>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + pvi_from_lcdif3: endpoint { + remote-endpoint = <&lcdif3_to_pvi>; + }; + }; + + port@1 { + reg = <1>; + pvi_to_hdmi_tx: endpoint { + remote-endpoint = <&hdmi_tx_from_pvi>; + }; + }; + }; + }; + + lcdif3: display-controller@32fc6000 { + compatible = "fsl,imx8mp-lcdif"; + reg = <0x32fc6000 0x238>; + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&irqsteer_hdmi>; + clocks = <&hdmi_tx_phy>, + <&clk IMX8MP_CLK_HDMI_APB>, + <&clk IMX8MP_CLK_HDMI_ROOT>; + clock-names = "pix", "axi", "disp_axi"; + power-domains = <&hdmi_blk_ctrl IMX8MP_HDMIBLK_PD_LCDIF>; + + port { + lcdif3_to_pvi: endpoint { + remote-endpoint = <&pvi_from_lcdif3>; + }; + }; + }; + + hdmi_tx: hdmi@32fd8000 { + compatible = "fsl,imx8mp-hdmi-tx"; + reg = <0x32fd8000 0x7eff>; + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&irqsteer_hdmi>; + clocks = <&clk IMX8MP_CLK_HDMI_APB>, + <&clk IMX8MP_CLK_HDMI_REF_266M>, + <&clk IMX8MP_CLK_32K>, + <&hdmi_tx_phy>; + clock-names = "iahb", "isfr", "cec", "pix"; + assigned-clocks = <&clk IMX8MP_CLK_HDMI_REF_266M>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>; + power-domains = <&hdmi_blk_ctrl IMX8MP_HDMIBLK_PD_HDMI_TX>; + reg-io-width = <1>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + hdmi_tx_from_pvi: endpoint { + remote-endpoint = <&pvi_to_hdmi_tx>; + }; + }; + + port@1 { + reg = <1>; + /* Point endpoint to the HDMI connector */ + }; + }; + }; + + hdmi_tx_phy: phy@32fdff00 { + compatible = "fsl,imx8mp-hdmi-phy"; + reg = <0x32fdff00 0x100>; + clocks = <&clk IMX8MP_CLK_HDMI_APB>, + <&clk IMX8MP_CLK_HDMI_24M>; + clock-names = "apb", "ref"; + assigned-clocks = <&clk IMX8MP_CLK_HDMI_24M>; + assigned-clock-parents = <&clk IMX8MP_CLK_24M>; + power-domains = <&hdmi_blk_ctrl IMX8MP_HDMIBLK_PD_HDMI_TX_PHY>; + #clock-cells = <0>; + #phy-cells = <0>; + status = "disabled"; + }; }; aips5: bus@30c00000 { From patchwork Sat Feb 3 16:52:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13544316 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 D4375C4828D for ; Sat, 3 Feb 2024 16:54:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB0F210EC10; Sat, 3 Feb 2024 16:54:38 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UE3OpuGN"; dkim-atps=neutral Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6C0A910EA64 for ; Sat, 3 Feb 2024 16:54:37 +0000 (UTC) Received: by mail-il1-f180.google.com with SMTP id e9e14a558f8ab-363c28eb463so819285ab.3 for ; Sat, 03 Feb 2024 08:54:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706979276; x=1707584076; 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=vyFysKI+ulqGIrIVYWeP6alGWB5geZ7uKPOowV05Tlo=; b=UE3OpuGNXFnXLyTkK2QbQ22Aop9a+tqANfHKIdBg1MwLPDO56Oje29Jtnu0/S6r7rA KYz4WWlybx49KgQ6+w/Erop6XTmiLSolTUSR/cwVQaIoqcVjkq20W5uAxtBdH3OhTent 70V9e+wGlQC5vobEOB8HbF7VFGyK12+Imj9BEIS+DAALYr/6sPbG3H5S2eXGUYjvyNuF uJG51o9rL9ZRGMIauxEi0Wwudw23O1LyxOyvPsFDAj7AsiLRZeKX8OehThuQT2tFDc9W m4oV0YdkeiVPzTsL6VbjLM/Iu6CTb/OAtlRL3p7CD9zcFffV/emjnGLjH8t2rX/gQBbT u2GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706979276; x=1707584076; 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=vyFysKI+ulqGIrIVYWeP6alGWB5geZ7uKPOowV05Tlo=; b=k2KIwANj6MklQFpSZbAPvkZVyi+ZQppjZ0+eyB7GQv0jp1q361VTJQ5WZNsR3MQyu4 zAbjA4fsndWECX7Ez9JaNFS179dr7ilU4GiEpyzXmmuzLUv7w6Kjk2So/nkVGUXCeJs8 5x4LgqdQSAxnwsvqEg+/PS7JrB9AsnVqa5UZmdj0HxqditO6fJFBLEAeqNId5+se3R44 w/YdskYti1dZVSQA1kEeVnVzdvUns6KC50BwEjN6I0EDFk702Hh5swDBEkIaZOCH6U9h ytZ6DDT6SsdFNI9/G/s0tz7/dtxt5f4QcJ4ppRZ6wb4+inVGHj+KbhuAID70ALaGp/PD PDjA== X-Gm-Message-State: AOJu0Yzlhxoo2pEUoS7ei3EKlsP2GhhSzRFwFj3j00AcKeRqW6jOdl8Z BKXvx0DEfcRM6LnDnWY5netee9MinhhsBKAglVNe+KLeAIYqPU0G X-Google-Smtp-Source: AGHT+IF1aACYQI7zwb4q5hLiUZpptfXorBFS4iS5gGCHnkIEhvZqaIY+gUX6CxiigB4ll3DqgkpL/w== X-Received: by 2002:a05:6e02:1d01:b0:363:ac17:f529 with SMTP id i1-20020a056e021d0100b00363ac17f529mr8191065ila.9.1706979276564; Sat, 03 Feb 2024 08:54:36 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVljTFGqHUSDda9IQphGIjLtMyFUmJsD5/fnOAFZYp2KpiC41NPfYVmEJNncZEAjdeLOrMUzdpOV5TbIlRuJLdiUGYnrmJbe41q13QCeCPiB4j+CHYs8WDll/NAuhl3pkt3eXzSWivXd/aXcCDCFBeeLXBvU9kyEhEqZZ/eUrewxxe2CwctMrTQYkJRL0xNw2AK3RX4xAeRXReeeWiCLNTAonyxyEAH4iiwBktEmXvbCu6eh58loDAY78XJsgrBp0gxfxxSB3KpbxvbznhG6ugQy0RHkFGg8ADrXOhxL7TPQBSRu2IqAyPopNRGXlwlzsOwD0Hg4RD8Ln2fjUD7uNk368Z1ZtaOuXnh/Z/g/W1hEnPiFUzLtP57Hl+G68yJ9OmYP5X0GGiMfmxdXJ3aa6YX+YTrhkgbUnjIPe4tBXyaNp2UN+qUZi8bGhE9ah9VRB6zKxAdunomFwGVngvOAwa5B9Dx2PILpUY0bfyN/ir6lzJCrsuyXO1o8F5T9S1cfriObbMiEPNHZa0qZ2okO/1w9JJj2sJ2sim4jLAsTOFDq+e/qxSfM9C6RI0bJImP57JqQg1G7O2wzDofYy+mf0ZuTCNYTHnAOIbqeAqvy896QqFaulKzd9yWq8IR99RiUFkRL0gJHob+80GOrvW5AJiQWS62k5Mtbh3O7ckOQfNveRcTw/E7XU5SouMLkcvsAdO5ePF12rv1Pzj3rLeMcHfyYgaWxiGs0i+IubvfyBABcO6xRt7LEHpYJijivKUpwW7juAGu939vJs0Fr/ebqBENphxakW6KwZYGtPja8EAxdRr9fVlrzgckTLX/szX2NxeyohtcmqIoPvt2vp1ld/eL258lQbGt3DiDGzr5ALeTbchKxeNt8vqIXl2zrSO9E6OcB+md7JB40W5GI9ByeKZI9AiA5d3NXhDNU81E7wOZt8PjCKtoWtF84pbIkA+2cKoD0g 3XwtNaf3IbP/ifREnAcq+5U3JXWrBWvuZg4Lm5VzSB+3EXvlL8OCnXdfpE5mp2peJ6R+cYt7c7baJLe25xPG0v4H8XAwA/pNVH1YuvC8oPK7Snx4QC/qXMw7M5l1WQN55hX+TVd5z6XkZX6KnyRHUiSMPvb17dSTk7B3F7ldYrcx+JrSkuAmx2OMjXShCBwUA2xbCQGwRrMBEp833JC+DPrJ1ZRzus5Q== Received: from aford-System-Version.lan ([2601:447:d002:5be:d9b2:bb4f:5531:6aa9]) by smtp.gmail.com with ESMTPSA id t30-20020a05663836de00b00470b29b82b1sm1086256jau.154.2024.02.03.08.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 08:54:32 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, alexander.stein@ew.tq-group.com, frieder.schrempf@kontron.de, Adam Ford , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Vinod Koul , Kishon Vijay Abraham I , Catalin Marinas , Will Deacon , Liu Ying , Ulf Hansson , Lucas Stach , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH V8 12/12] arm64: defconfig: Enable DRM_IMX8MP_DW_HDMI_BRIDGE as module Date: Sat, 3 Feb 2024 10:52:52 -0600 Message-ID: <20240203165307.7806-13-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203165307.7806-1-aford173@gmail.com> References: <20240203165307.7806-1-aford173@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The i.MX8M Plus has support for an HDMI transmitter. The video is genereated by lcdif3, routed to the hdmi parallel video interface, then fed to a DW HDMI bridge to support up to 4K video output. Signed-off-by: Adam Ford --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index e6cf3e5d63c3..3e33825f0ed7 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -880,6 +880,7 @@ CONFIG_DRM_ANALOGIX_ANX7625=m CONFIG_DRM_I2C_ADV7511=m CONFIG_DRM_I2C_ADV7511_AUDIO=y CONFIG_DRM_CDNS_MHDP8546=m +CONFIG_DRM_IMX8MP_DW_HDMI_BRIDGE=m CONFIG_DRM_DW_HDMI_AHB_AUDIO=m CONFIG_DRM_DW_HDMI_CEC=m CONFIG_DRM_IMX_DCSS=m