From patchwork Sat Feb 10 20:45:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13552314 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7691DC4829A for ; Sat, 10 Feb 2024 20:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YwsFRoiP17QZ8vxPqvVf6dD+rQH40/KjdQ2O4iH5GUI=; b=RG7y10e0YF5KHs xZ4OchHomd5bLeC6pEk3ip6iv6fCwbfjxCBqXU7FGezViRG/9BB9mVklw/xqUSWQG5uoDJHmGj2fW wY4MfzGRrCOPxiqeXTHRvrrdnVy7jH5yfqJnOLo4Pc23O8Qrev8AZUyAPqIXh1llmrLE8mF/LGB0G +qOdVr/9qGMHZFQZLdTxapZpzUV3wJGHrEWhD5RxsGc2y2Z3Vetr0ns0ol9bDSDr7OeV2aL44D4db ThMM6ctXZwOPvmvK5D+INDEvO8MJiM1HTtVaZ+leJE/PEHVyxIEqVCt1LwVl/YaqUvL1P5KXDLUSn CwVgHd9py4Bw9Ju0JXHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuEz-0000000202u-0PnG; Sat, 10 Feb 2024 20:46:25 +0000 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuEt-0000000201T-3UWR; Sat, 10 Feb 2024 20:46:21 +0000 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-6860ff3951aso10408416d6.1; Sat, 10 Feb 2024 12:46:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707597978; x=1708202778; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rkNsLeVU+SRAFCzJ9Atwqu/RzNdjkmQfb6CAAkLA5vg=; b=M+m+ptGe7xXBOn6r8M635wXT8uCZwghtrAKSg/gDWlXwMS++k3ZeEuqOAUbnIU1MrM Ocv3mUzKIAFU2D14mGrf1i1zcS8xPOtLpax3imXG4OYhXc9pgAMU8kazC/sopijgKjBu lW2JoCjMWbdk2rvikvgN13RL81c3ccn8IsOmcFLAW9qSQimUWu80INzL62YjpFjYHNm4 LSftpfwFWt2d315ay0C0bB3//D37G/HGXB12Aw3awKPXwQVVjaq0bFZfR92TWBvli8zG /0ivofhJZdPe9B+DBzydin/2xz1tmE/CBGa+YdoCEql+Uh6g2ncVK24zMXc7A4mvr6KJ 4OlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707597978; x=1708202778; 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=rkNsLeVU+SRAFCzJ9Atwqu/RzNdjkmQfb6CAAkLA5vg=; b=wj6h7cs1PgzNIvhxZfMgkTRfJ5llu7rzABwZGBQu2+xcKGpWf4ROTSY0MUAanfa+U3 5/qpn0HYcvEOUGKKoHarFkI97FZi2Jl2uAGB18EGCo78/Xu5aOd0jTnCfiPO9wwSLB5X bVP1UrzW5fTtF5krrVoBovZqrGz0r8wsN6usG+wOsv7tI+D3kzJVgp2J6h1wxKfPkEEf IiZ5H0epe8D71HXqkaeseG6+YjEvyneYhBpTk0G3BuGKpVAMvBKHbq6ROQ5tC8zHMnjq tlNbOKI1RK1kP8Coa5xbVHHHg0M9vcwEgT9/lxUArCa67YBBwLKpra0F8CV5Tw5l+PeF dS1A== X-Gm-Message-State: AOJu0YzAg9k6mWHPf1ZoK14QGrRj3dBdbBvTPbPf9oU2VscD+iY8dEyi N8UOC8T/s6DlmQOI0xZ8/s6zVzyZ+6wvYswlacg8Ed4BvCoiSmNx+tf9jk2y X-Google-Smtp-Source: AGHT+IF94WoT40Z1SKL5d5z4/OFRL+ZpRt/Mh1eBS3ikAJhmzuMZZOJeU+bidfzzLQ+2XJfqDqceaw== X-Received: by 2002:ad4:5967:0:b0:68c:c977:df6e with SMTP id eq7-20020ad45967000000b0068cc977df6emr4198960qvb.10.1707597978047; Sat, 10 Feb 2024 12:46:18 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXp+RFU8mZpxCtEceZNXbFefupSCxccqNul+K627frYKB5kqD9Ci0D+HmS0VoTCA2l9hr/+GH5IEcWuxD25v6REUdfZUD25aWmh0501FUYZ7hhykFZQ8Nfsm5j1pZUQKgB7V4mw3i35kMli+wNH+wyOQnWXtWEt/Z+AYOEYxqEWiQaN/mj7t6rN+75gPm0o8CzSQqROVyLdY8w1wOr3ecmy/x318kl18r3p9zq01TEPkR5dpSrpwv1wrX/YuQ3b+IPqcofgjgj37lnx/fwywbQbOq5OR+Gw7piXYfii+ITjOplrII9MaXDC8CZ9X///b0LUK498XQ56zkKvBjwQNX8+DSvqqr/emzhFJWPrW2tRlMlZxhm4TcZT0hj4D5OlLVtxqMKqAV0ycOGLfE5XEoMpvgmYt9nluCcbp3kASNAM/CmZuBN6S5C8MpXrPU/6bTBHKqabD0xJhWrR3kED5docHGr6g5huCauJ9Txg3bI5znAdAJSPOKlpLpFg18cAdi9bcWKV6LjCVBoqcTxSTB9+aTl/Pz8/iQd740Z8J6C2PmJWVfSaP4Sn+OiXTFzwLqnfaedqXz7AtEx3vwwF81rWTQw0+AcOoSBI4X+3o0fCD/LVCwUr9wV7K+9EmdE2P4SK4hSwGP/QJ/KVVMDzfnVd Received: from aford-System-Version.lan ([2601:447:d002:5be:27d7:3989:2897:88a7]) by smtp.gmail.com with ESMTPSA id m20-20020a0cdb94000000b0068c9db26ae1sm2079526qvk.41.2024.02.10.12.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 12:46:17 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, aford@beaconembedded.com, Lucas Stach , Adam Ford , Krzysztof Kozlowski , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 1/6] dt-bindings: phy: add binding for the i.MX8MP HDMI PHY Date: Sat, 10 Feb 2024 14:45:57 -0600 Message-ID: <20240210204606.11944-2-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240210204606.11944-1-aford173@gmail.com> References: <20240210204606.11944-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240210_124619_902866_E0A42FBD X-CRM114-Status: GOOD ( 15.61 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org 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 --- V4: No Change V3: Removed mintems at the request of Krzysztof and add his reviewed-by V2: 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. 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 10 20:45:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13552315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 971FAC4829A for ; Sat, 10 Feb 2024 20:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7/JZCnBDNY2//7XRPHfzFbHD8ZBF0YOFIybMJLD28kU=; b=XA3VC8ahB1K8Xa kenBYfIHhaQTpAQZCUnaWqpZeO0wGLoT5QRsMaIHGlFHtszWRqgCRRPPIHsHg6HxJ+s8E+se9gvd6 hMNZb9LETfMHNW2vs6P9zNk7wmk4ScaleJt21vdBoexmc+bjT/psyADMUFPM+1MljCt+V9Izbs/pN P0pLz5WLBJOgRny4jcZZfHCORBh//pABVuKe5LF4Bop/ArFZnWFsI6zid/PezkgyXzqjzNaA46+5N HHdDLV5342i3Qg/3bUIooOJ9futvF7Y6eNW4ijomOntAjQRW9aGnZ5rMMMkeEq7oKDAWOVNlfQCrw S6hSr8tF+/t6aH0wkHEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuF2-0000000204H-0sVz; Sat, 10 Feb 2024 20:46:28 +0000 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuEw-0000000202G-20pz; Sat, 10 Feb 2024 20:46:24 +0000 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-6818a9fe380so12236946d6.2; Sat, 10 Feb 2024 12:46:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707597981; x=1708202781; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qkPGBigxuH9warUrMt9eISTDJDr/S8IdWQHRaTUGh/w=; b=maNeUZAhxm2yqmSiQqent49fx05nzRUAQFszQWhB3kh7aSz/bfbUfYYYdHPXnwZ1U8 O3JcdBA3JhudkZkPOkF03GT84hRdeuDjeu3qYAlEO6j/nhmvs/VSNYAgt5B2fD8BXZgh d8+V3thXRbqOsxV2Ti1wg1P3LwSFxU2WT7VFyHbauPHX0XdzeZc5PFguOPQSe6bTPFK9 LHeoWAx5QF9T3UVg8/Wz9vgVYcKj88h2YETru2xu+FvGXjdDqa595+NkG/9e+vli6bjD RmCKIhMJT64G7GpYQIWO1tW/+rZySqC1MHL9jLfFqcbX+V5NSVw0dRAwn2XKKIL2nofM iTeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707597981; x=1708202781; 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=qkPGBigxuH9warUrMt9eISTDJDr/S8IdWQHRaTUGh/w=; b=W6bSDWfgLxGN3i76f+ppEm5vF6o5Cc+x3orkj+S2Ua4VdeodXesO2YZNUPM+PZvFqT znXHo/BYf70S+oTK0ag9higdIeCkc5BcZ1+Meo66iVEvEJ9/DNhv2k4vOG1mWVF1rtHm rfTZmcNY99PDWZbM9cTCKHt3zBH2HoSQYSdep1L14LPMPAevc8QvXsYtJzPSHmV3oOM5 BaAZ1QzugzcJqKBVaIB+9oypSWz98iBjLLCvLjlXgueSBrNp498IB5NwAJTgAKIO40wc K9+kKDEPOQkPJ091YTgAA3+sb7jdRKup6zzW+cEAGmaow57ahtGwFa+PK+QrRs9ncyDY Vddg== X-Gm-Message-State: AOJu0YxkYUa5TBCrEMs4ncBoLSkaXgYau7iQ/KKiNa86InZsSk+4HvZ7 CmWylDvDtokS/RMYOmXsTgedsMCbPeDgP4zNJeHuvyXsI+XTn3TKrEPoWmmc X-Google-Smtp-Source: AGHT+IGA5jTR8rbO9GFV5Cactli80P+8FqAVr4MamrMgKdmUzAd3U6TmzRRxOi8L9apQmkui2XmgGQ== X-Received: by 2002:a0c:f305:0:b0:68c:5486:b770 with SMTP id j5-20020a0cf305000000b0068c5486b770mr2987680qvl.65.1707597981058; Sat, 10 Feb 2024 12:46:21 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWwPUg7jQCU9zpiMnkJHX2PaZdnoPbfRQAb3l654g5UmDK2Kzxnq5p5DFDyAvQClGbX7gr+C2IIMT1uohlzRYwOjJuyh32Nm16HkxkeWs9+ZnKidfzsLrtyZZxDV3ajKeiVNSwJBOjNsFA7dko8d8eEHbGb/EBiYlIo2HvwiY04uKjnCPVUSAOiFq/X52Bpe35pBHgb0P641jwCUcJZ+SqMdsdThueQZDEyDZKgfwn6+tGY+caMfFmSf1g9HUKpG5oAjtbzaqUBqZls2qyVDJbvHFoj1KKUco0xgzr1wUCini+n5tmce1ms3oacNWKxRcSN30M980X6YyvG7sqWNWYjDbQn9l1xMOWMEvH9L6jwfgQr7m0J5NrfDQwadlpyXPica+jWFaf5vfu2EUkNOObWDRFun/3nQHweFaS4gW5Et5evqs1iFjkkcBFbK9vnYABBs5t2pcMAqS+V4ezi3ur7cVG7xqqYGs2Y9fkWQREA5u+uMmvZERV2X8I48eHYVP21mP9huEMrQMH2SP3ZSMsDla+C3iKsrvr1sMrL3y5auqbUw6LThn9cEI+yy5gtnyqCQ8cCjqfASnoVqM28ViH2Sq0I0lGQWOKRgZGCYkW1KEZzSo7NZPhJsVI7C1b66k0N53NQMQe0wb8bS1qPqVqLBlSEKZOrizGsNu3hiaYs4JCYq7ijIXeTQ557EyJHGBAD5UQo4RIG9w1C+G+7tkyoEiAw+r2UFUGyDvbb2xnJShozE6syfUbYExFoIxmDyYvU5AZE8CUEFV5jb9kDMzgka6TNahoqEZVt006EPJks Received: from aford-System-Version.lan ([2601:447:d002:5be:27d7:3989:2897:88a7]) by smtp.gmail.com with ESMTPSA id m20-20020a0cdb94000000b0068c9db26ae1sm2079526qvk.41.2024.02.10.12.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 12:46:20 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, aford@beaconembedded.com, Lucas Stach , Luca Ceresoli , Richard Leitner , Marco Felsch , Alexander Stein , Frieder Schrempf , Adam Ford , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 2/6] phy: freescale: add Samsung HDMI PHY Date: Sat, 10 Feb 2024 14:45:58 -0600 Message-ID: <20240210204606.11944-3-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240210204606.11944-1-aford173@gmail.com> References: <20240210204606.11944-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240210_124622_647918_848DBAEA X-CRM114-Status: GOOD ( 20.21 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Lucas Stach This adds the driver for the Samsung HDMI PHY found on the i.MX8MP SoC. Based on downstream implementation from Sandor Yu . According to the TRM, the PHY receives parallel data from the link and serializes it. It also sets the PLL clock needed for the TX serializer. Tested-by: Luca Ceresoli (v2) Tested-by: Richard Leitner (v2) Co-developed-by: Marco Felsch Signed-off-by: Marco Felsch Signed-off-by: Lucas Stach Tested-by: Alexander Stein Tested-by: Frieder Schrempf # Kontron BL Tested-by: Luca Ceresoli Signed-off-by: Adam Ford Tested-by: Marek Vasut Tested-by: Luca Ceresoli --- V4: - I (Adam) added a comment in the code for clarifcation based on questions from Luca concerning a difference between the code and the ref manual. - Fixed the GENMASK on REG14 - Expanded the commit message briefly describing a bit more of what this driver does. - Removed some unnecessary include files. v3: - use GENMASK/FIELD_PREP - lowercase hex values - correct coding style v2: - use DEFINE_RUNTIME_DEV_PM_OPS --- drivers/phy/freescale/Kconfig | 6 + drivers/phy/freescale/Makefile | 1 + drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 721 +++++++++++++++++++ 3 files changed, 728 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..c4386bfdb853 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..91cf8e4668b2 --- /dev/null +++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c @@ -0,0 +1,721 @@ +// 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_00 0x00 +#define PHY_REG_01 0x04 +#define PHY_REG_02 0x08 +#define PHY_REG_08 0x20 +#define PHY_REG_09 0x24 +#define PHY_REG_10 0x28 +#define PHY_REG_11 0x2c + +#define PHY_REG_12 0x30 +#define REG12_CK_DIV_MASK GENMASK(5, 4) + +#define PHY_REG_13 0x34 +#define REG13_TG_CODE_LOW_MASK GENMASK(7, 0) + +#define PHY_REG_14 0x38 +#define REG14_TOL_MASK GENMASK(7, 4) +#define REG14_RP_CODE_MASK GENMASK(3, 1) +#define REG14_TG_CODE_HIGH_MASK GENMASK(0, 0) + +#define PHY_REG_15 0x3c +#define PHY_REG_16 0x40 +#define PHY_REG_17 0x44 +#define PHY_REG_18 0x48 +#define PHY_REG_19 0x4c +#define PHY_REG_20 0x50 + +#define PHY_REG_21 0x54 +#define REG21_SEL_TX_CK_INV BIT(7) +#define REG21_PMS_S_MASK GENMASK(3, 0) + +#define PHY_REG_22 0x58 +#define PHY_REG_23 0x5c +#define PHY_REG_24 0x60 +#define PHY_REG_25 0x64 +#define PHY_REG_26 0x68 +#define PHY_REG_27 0x6c +#define PHY_REG_28 0x70 +#define PHY_REG_29 0x74 +#define PHY_REG_30 0x78 +#define PHY_REG_31 0x7c +#define PHY_REG_32 0x80 + +/* + * REG33 does not match the ref manual. According to Sandor Yu from NXP, + * "There is a doc issue on the i.MX8MP latest RM" + * REG33 is being used per guidance from Sandor + */ + +#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_REG_35 0x8c +#define PHY_REG_36 0x90 +#define PHY_REG_37 0x94 +#define PHY_REG_38 0x98 +#define PHY_REG_39 0x9c +#define PHY_REG_40 0xa0 +#define PHY_REG_41 0xa4 +#define PHY_REG_42 0xa8 +#define PHY_REG_43 0xac +#define PHY_REG_44 0xb0 +#define PHY_REG_45 0xb4 +#define PHY_REG_46 0xb8 +#define PHY_REG_47 0xbc + +#define PHY_PLL_DIV_REGS_NUM 6 + +struct phy_config { + u32 pixclk; + u8 pll_div_regs[PHY_PLL_DIV_REGS_NUM]; +}; + +const struct phy_config phy_pll_cfg[] = { + { + .pixclk = 22250000, + .pll_div_regs = { 0x4b, 0xf1, 0x89, 0x88, 0x80, 0x40 }, + }, { + .pixclk = 23750000, + .pll_div_regs = { 0x50, 0xf1, 0x86, 0x85, 0x80, 0x40 }, + }, { + .pixclk = 24000000, + .pll_div_regs = { 0x50, 0xf0, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 24024000, + .pll_div_regs = { 0x50, 0xf1, 0x99, 0x02, 0x80, 0x40 }, + }, { + .pixclk = 25175000, + .pll_div_regs = { 0x54, 0xfc, 0xcc, 0x91, 0x80, 0x40 }, + }, { + .pixclk = 25200000, + .pll_div_regs = { 0x54, 0xf0, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 26750000, + .pll_div_regs = { 0x5a, 0xf2, 0x89, 0x88, 0x80, 0x40 }, + }, { + .pixclk = 27000000, + .pll_div_regs = { 0x5a, 0xf0, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 27027000, + .pll_div_regs = { 0x5a, 0xf2, 0xfd, 0x0c, 0x80, 0x40 }, + }, { + .pixclk = 29500000, + .pll_div_regs = { 0x62, 0xf4, 0x95, 0x08, 0x80, 0x40 }, + }, { + .pixclk = 30750000, + .pll_div_regs = { 0x66, 0xf4, 0x82, 0x01, 0x88, 0x45 }, + }, { + .pixclk = 30888000, + .pll_div_regs = { 0x66, 0xf4, 0x99, 0x18, 0x88, 0x45 }, + }, { + .pixclk = 33750000, + .pll_div_regs = { 0x70, 0xf4, 0x82, 0x01, 0x80, 0x40 }, + }, { + .pixclk = 35000000, + .pll_div_regs = { 0x58, 0xb8, 0x8b, 0x88, 0x80, 0x40 }, + }, { + .pixclk = 36000000, + .pll_div_regs = { 0x5a, 0xb0, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 36036000, + .pll_div_regs = { 0x5a, 0xb2, 0xfd, 0x0c, 0x80, 0x40 }, + }, { + .pixclk = 40000000, + .pll_div_regs = { 0x64, 0xb0, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 43200000, + .pll_div_regs = { 0x5a, 0x90, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 43243200, + .pll_div_regs = { 0x5a, 0x92, 0xfd, 0x0c, 0x80, 0x40 }, + }, { + .pixclk = 44500000, + .pll_div_regs = { 0x5c, 0x92, 0x98, 0x11, 0x84, 0x41 }, + }, { + .pixclk = 47000000, + .pll_div_regs = { 0x62, 0x94, 0x95, 0x82, 0x80, 0x40 }, + }, { + .pixclk = 47500000, + .pll_div_regs = { 0x63, 0x96, 0xa1, 0x82, 0x80, 0x40 }, + }, { + .pixclk = 50349650, + .pll_div_regs = { 0x54, 0x7c, 0xc3, 0x8f, 0x80, 0x40 }, + }, { + .pixclk = 50400000, + .pll_div_regs = { 0x54, 0x70, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 53250000, + .pll_div_regs = { 0x58, 0x72, 0x84, 0x03, 0x82, 0x41 }, + }, { + .pixclk = 53500000, + .pll_div_regs = { 0x5a, 0x72, 0x89, 0x88, 0x80, 0x40 }, + }, { + .pixclk = 54000000, + .pll_div_regs = { 0x5a, 0x70, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 54054000, + .pll_div_regs = { 0x5a, 0x72, 0xfd, 0x0c, 0x80, 0x40 }, + }, { + .pixclk = 59000000, + .pll_div_regs = { 0x62, 0x74, 0x95, 0x08, 0x80, 0x40 }, + }, { + .pixclk = 59340659, + .pll_div_regs = { 0x62, 0x74, 0xdb, 0x52, 0x88, 0x47 }, + }, { + .pixclk = 59400000, + .pll_div_regs = { 0x63, 0x70, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 61500000, + .pll_div_regs = { 0x66, 0x74, 0x82, 0x01, 0x88, 0x45 }, + }, { + .pixclk = 63500000, + .pll_div_regs = { 0x69, 0x74, 0x89, 0x08, 0x80, 0x40 }, + }, { + .pixclk = 67500000, + .pll_div_regs = { 0x54, 0x52, 0x87, 0x03, 0x80, 0x40 }, + }, { + .pixclk = 70000000, + .pll_div_regs = { 0x58, 0x58, 0x8b, 0x88, 0x80, 0x40 }, + }, { + .pixclk = 72000000, + .pll_div_regs = { 0x5a, 0x50, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 72072000, + .pll_div_regs = { 0x5a, 0x52, 0xfd, 0x0c, 0x80, 0x40 }, + }, { + .pixclk = 74176000, + .pll_div_regs = { 0x5d, 0x58, 0xdb, 0xA2, 0x88, 0x41 }, + }, { + .pixclk = 74250000, + .pll_div_regs = { 0x5c, 0x52, 0x90, 0x0d, 0x84, 0x41 }, + }, { + .pixclk = 78500000, + .pll_div_regs = { 0x62, 0x54, 0x87, 0x01, 0x80, 0x40 }, + }, { + .pixclk = 80000000, + .pll_div_regs = { 0x64, 0x50, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 82000000, + .pll_div_regs = { 0x66, 0x54, 0x82, 0x01, 0x88, 0x45 }, + }, { + .pixclk = 82500000, + .pll_div_regs = { 0x67, 0x54, 0x88, 0x01, 0x90, 0x49 }, + }, { + .pixclk = 89000000, + .pll_div_regs = { 0x70, 0x54, 0x84, 0x83, 0x80, 0x40 }, + }, { + .pixclk = 90000000, + .pll_div_regs = { 0x70, 0x54, 0x82, 0x01, 0x80, 0x40 }, + }, { + .pixclk = 94000000, + .pll_div_regs = { 0x4e, 0x32, 0xa7, 0x10, 0x80, 0x40 }, + }, { + .pixclk = 95000000, + .pll_div_regs = { 0x50, 0x31, 0x86, 0x85, 0x80, 0x40 }, + }, { + .pixclk = 98901099, + .pll_div_regs = { 0x52, 0x3a, 0xdb, 0x4c, 0x88, 0x47 }, + }, { + .pixclk = 99000000, + .pll_div_regs = { 0x52, 0x32, 0x82, 0x01, 0x88, 0x47 }, + }, { + .pixclk = 100699300, + .pll_div_regs = { 0x54, 0x3c, 0xc3, 0x8f, 0x80, 0x40 }, + }, { + .pixclk = 100800000, + .pll_div_regs = { 0x54, 0x30, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 102500000, + .pll_div_regs = { 0x55, 0x32, 0x8c, 0x05, 0x90, 0x4b }, + }, { + .pixclk = 104750000, + .pll_div_regs = { 0x57, 0x32, 0x98, 0x07, 0x90, 0x49 }, + }, { + .pixclk = 106500000, + .pll_div_regs = { 0x58, 0x32, 0x84, 0x03, 0x82, 0x41 }, + }, { + .pixclk = 107000000, + .pll_div_regs = { 0x5a, 0x32, 0x89, 0x88, 0x80, 0x40 }, + }, { + .pixclk = 108000000, + .pll_div_regs = { 0x5a, 0x30, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 108108000, + .pll_div_regs = { 0x5a, 0x32, 0xfd, 0x0c, 0x80, 0x40 }, + }, { + .pixclk = 118000000, + .pll_div_regs = { 0x62, 0x34, 0x95, 0x08, 0x80, 0x40 }, + }, { + .pixclk = 118800000, + .pll_div_regs = { 0x63, 0x30, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 123000000, + .pll_div_regs = { 0x66, 0x34, 0x82, 0x01, 0x88, 0x45 }, + }, { + .pixclk = 127000000, + .pll_div_regs = { 0x69, 0x34, 0x89, 0x08, 0x80, 0x40 }, + }, { + .pixclk = 135000000, + .pll_div_regs = { 0x70, 0x34, 0x82, 0x01, 0x80, 0x40 }, + }, { + .pixclk = 135580000, + .pll_div_regs = { 0x71, 0x39, 0xe9, 0x82, 0x9c, 0x5b }, + }, { + .pixclk = 137520000, + .pll_div_regs = { 0x72, 0x38, 0x99, 0x10, 0x85, 0x41 }, + }, { + .pixclk = 138750000, + .pll_div_regs = { 0x73, 0x35, 0x88, 0x05, 0x90, 0x4d }, + }, { + .pixclk = 140000000, + .pll_div_regs = { 0x75, 0x36, 0xa7, 0x90, 0x80, 0x40 }, + }, { + .pixclk = 144000000, + .pll_div_regs = { 0x78, 0x30, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 148352000, + .pll_div_regs = { 0x7b, 0x35, 0xdb, 0x39, 0x90, 0x45 }, + }, { + .pixclk = 148500000, + .pll_div_regs = { 0x7b, 0x35, 0x84, 0x03, 0x90, 0x45 }, + }, { + .pixclk = 154000000, + .pll_div_regs = { 0x40, 0x18, 0x83, 0x01, 0x00, 0x40 }, + }, { + .pixclk = 157000000, + .pll_div_regs = { 0x41, 0x11, 0xa7, 0x14, 0x80, 0x40 }, + }, { + .pixclk = 160000000, + .pll_div_regs = { 0x42, 0x12, 0xa1, 0x20, 0x80, 0x40 }, + }, { + .pixclk = 162000000, + .pll_div_regs = { 0x43, 0x18, 0x8b, 0x08, 0x96, 0x55 }, + }, { + .pixclk = 164000000, + .pll_div_regs = { 0x45, 0x11, 0x83, 0x82, 0x90, 0x4b }, + }, { + .pixclk = 165000000, + .pll_div_regs = { 0x45, 0x11, 0x84, 0x81, 0x90, 0x4b }, + }, { + .pixclk = 180000000, + .pll_div_regs = { 0x4b, 0x10, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 185625000, + .pll_div_regs = { 0x4e, 0x12, 0x9a, 0x95, 0x80, 0x40 }, + }, { + .pixclk = 188000000, + .pll_div_regs = { 0x4e, 0x12, 0xa7, 0x10, 0x80, 0x40 }, + }, { + .pixclk = 198000000, + .pll_div_regs = { 0x52, 0x12, 0x82, 0x01, 0x88, 0x47 }, + }, { + .pixclk = 205000000, + .pll_div_regs = { 0x55, 0x12, 0x8c, 0x05, 0x90, 0x4b }, + }, { + .pixclk = 209500000, + .pll_div_regs = { 0x57, 0x12, 0x98, 0x07, 0x90, 0x49 }, + }, { + .pixclk = 213000000, + .pll_div_regs = { 0x58, 0x12, 0x84, 0x03, 0x82, 0x41 }, + }, { + .pixclk = 216000000, + .pll_div_regs = { 0x5a, 0x10, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 216216000, + .pll_div_regs = { 0x5a, 0x12, 0xfd, 0x0c, 0x80, 0x40 }, + }, { + .pixclk = 237600000, + .pll_div_regs = { 0x63, 0x10, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 254000000, + .pll_div_regs = { 0x69, 0x14, 0x89, 0x08, 0x80, 0x40 }, + }, { + .pixclk = 277500000, + .pll_div_regs = { 0x73, 0x15, 0x88, 0x05, 0x90, 0x4d }, + }, { + .pixclk = 288000000, + .pll_div_regs = { 0x78, 0x10, 0x00, 0x00, 0x80, 0x00 }, + }, { + .pixclk = 297000000, + .pll_div_regs = { 0x7b, 0x15, 0x84, 0x03, 0x90, 0x45 }, + }, +}; + +struct reg_settings { + u8 reg; + u8 val; +}; + +const struct reg_settings common_phy_cfg[] = { + { PHY_REG_00, 0x00 }, { PHY_REG_01, 0xd1 }, + { PHY_REG_08, 0x4f }, { PHY_REG_09, 0x30 }, + { PHY_REG_10, 0x33 }, { PHY_REG_11, 0x65 }, + /* REG12 pixclk specific */ + /* REG13 pixclk specific */ + /* REG14 pixclk specific */ + { PHY_REG_15, 0x80 }, { PHY_REG_16, 0x6c }, + { PHY_REG_17, 0xf2 }, { PHY_REG_18, 0x67 }, + { PHY_REG_19, 0x00 }, { PHY_REG_20, 0x10 }, + /* REG21 pixclk specific */ + { PHY_REG_22, 0x30 }, { PHY_REG_23, 0x32 }, + { PHY_REG_24, 0x60 }, { PHY_REG_25, 0x8f }, + { PHY_REG_26, 0x00 }, { PHY_REG_27, 0x00 }, + { PHY_REG_28, 0x08 }, { PHY_REG_29, 0x00 }, + { PHY_REG_30, 0x00 }, { PHY_REG_31, 0x00 }, + { PHY_REG_32, 0x00 }, { PHY_REG_33, 0x80 }, + { PHY_REG_34, 0x00 }, { PHY_REG_35, 0x00 }, + { PHY_REG_36, 0x00 }, { PHY_REG_37, 0x00 }, + { PHY_REG_38, 0x00 }, { PHY_REG_39, 0x00 }, + { PHY_REG_40, 0x00 }, { PHY_REG_41, 0xe0 }, + { PHY_REG_42, 0x83 }, { PHY_REG_43, 0x0f }, + { PHY_REG_44, 0x3E }, { PHY_REG_45, 0xf8 }, + { PHY_REG_46, 0x00 }, { PHY_REG_47, 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 void +fsl_samsung_hdmi_phy_configure_pixclk(struct fsl_samsung_hdmi_phy *phy, + const struct phy_config *cfg) +{ + u8 div; + + switch (cfg->pixclk) { + case 22250000 ... 33750000: + div = 0xf; + break; + case 35000000 ... 40000000: + div = 0xb; + break; + case 43200000 ... 47500000: + div = 0x9; + break; + case 50349650 ... 63500000: + div = 0x7; + break; + case 67500000 ... 90000000: + div = 0x5; + break; + case 94000000 ... 148500000: + div = 0x3; + break; + case 154000000 ... 297000000: + div = 0x1; + break; + } + + writeb(REG21_SEL_TX_CK_INV | FIELD_PREP(REG21_PMS_S_MASK, div), + phy->regs + PHY_REG_21); +} + +static void +fsl_samsung_hdmi_phy_configure_pll_lock_det(struct fsl_samsung_hdmi_phy *phy, + const struct phy_config *cfg) +{ + u32 pclk = cfg->pixclk; + u32 fld_tg_code; + u32 pclk_khz; + u8 div; + + switch (cfg->pixclk) { + case 22250000 ... 47500000: + div = 1; + break; + case 50349650 ... 99000000: + div = 2; + break; + case 100699300 ... 198000000: + div = 4; + break; + case 205000000 ... 297000000: + div = 8; + break; + } + + writeb(FIELD_PREP(REG12_CK_DIV_MASK, ilog2(div)), phy->regs + PHY_REG_12); + + /* + * Calculation for the frequency lock detector target code (fld_tg_code) + * is based on reference manual register description of PHY_REG13 + * (13.10.3.1.14.2): + * 1st) Calculate int_pllclk which is determinded by FLD_CK_DIV + * 2nd) Increase resolution to avoid rounding issues + * 3th) Do the div (256 / Freq. of int_pllclk) * 24 + * 4th) Reduce the resolution and always round up since the NXP + * settings rounding up always too. TODO: Check if that is + * correct. + */ + pclk /= div; + pclk_khz = pclk / 1000; + fld_tg_code = 256 * 1000 * 1000 / pclk_khz * 24; + fld_tg_code = DIV_ROUND_UP(fld_tg_code, 1000); + + /* FLD_TOL and FLD_RP_CODE taken from downstream driver */ + writeb(FIELD_PREP(REG13_TG_CODE_LOW_MASK, fld_tg_code), + phy->regs + PHY_REG_13); + writeb(FIELD_PREP(REG14_TOL_MASK, 2) | + FIELD_PREP(REG14_RP_CODE_MASK, 2) | + FIELD_PREP(REG14_TG_CODE_HIGH_MASK, fld_tg_code >> 8), + phy->regs + PHY_REG_14); +} + +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); + + /* common PHY registers */ + for (i = 0; i < ARRAY_SIZE(common_phy_cfg); i++) + writeb(common_phy_cfg[i].val, phy->regs + common_phy_cfg[i].reg); + + /* set individual PLL registers PHY_REG2 ... PHY_REG7 */ + for (i = 0; i < PHY_PLL_DIV_REGS_NUM; i++) + writeb(cfg->pll_div_regs[i], phy->regs + PHY_REG_02 + i * 4); + + fsl_samsung_hdmi_phy_configure_pixclk(phy, cfg); + fsl_samsung_hdmi_phy_configure_pll_lock_det(phy, cfg); + + 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->pixclk; +} + +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].pixclk <= rate) + return phy_pll_cfg[i].pixclk; + + 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].pixclk <= 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; +} + +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; + +} + +static DEFINE_RUNTIME_DEV_PM_OPS(fsl_samsung_hdmi_phy_pm_ops, + fsl_samsung_hdmi_phy_suspend, + fsl_samsung_hdmi_phy_resume, NULL); + +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 = pm_ptr(&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"); From patchwork Sat Feb 10 20:45:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13552316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2DADC4829D for ; Sat, 10 Feb 2024 20:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S2xr5Ito46SAfIsC8hc1OeukkxOl2LaY2amAV/04orw=; b=O65aAZj+kJjIr6 PWH/4AXqWOnsjr6pEpZixJmLWDRTRDBtZoIPph5tM4Sl0bg5MBiZv5LfLAHL6U2uer1lURpkESpGe erV/8JXDNTh1S51on2pPZtbzUSdexCcnUyoKv5gmkRpODXJ67f6PfQfPriXokMacqg2YFvkuVcuVT zLaS7bikyMMVs657+kpi/yrmFpuq75MB7X+ZUeztV/2BeidoZ2yBxMsottRQnIoJKYZ6LHTVSQmKY NC72lfYAF41MfpGgDtfa4kI5DmYjX51XFzO0Z3qPtSguCO5x2/mTDrwV6D4Qt+Kpu5FnMb/lPUf9Z 1odzYAZ1n9jg8SZaQrFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuF3-0000000205B-2EOJ; Sat, 10 Feb 2024 20:46:29 +0000 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuEz-0000000202h-1Oia; Sat, 10 Feb 2024 20:46:26 +0000 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-206689895bfso1451459fac.1; Sat, 10 Feb 2024 12:46:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707597983; x=1708202783; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=V1sqss5k7/14SKgqnTfmbe/yknHcrWFOpPFDxDP9yBY=; b=MuXboAfj0MsGeEgULzfLmEIxd+0qjxMTIzIoOgxGwoMY1EaL9EZtXL6wXT3FF9lZm2 /WZZnSDquZMsW60xS9pIDrwxvndLOHKDsw6NTbTWRDN85htQfzwYN/79r5gIBCduCCqS Wxm5MXDByGgyyFyCGTPlLrcwJdRDnLkxq4jaYXXvI5+SlRuIHWzvvYFn6caTi8up7YWn +4Ttt64CvJxURn4hgmqpPkwzYoX2wc4rGaCEVNDaBrYuf7ykQ6T6gUgVDmId7vEGf8lZ 8N7zJLP5kGMO88jeS4wKnOHhbAU/wJL0hkcYHvHL/5nLfomGHhhRJteI4uaqyoK70hVT 994w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707597983; x=1708202783; 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=V1sqss5k7/14SKgqnTfmbe/yknHcrWFOpPFDxDP9yBY=; b=IS1uRJQRRZq7w85vnlQOa9d3hFbpwUaRvrPM1S28mmVvef2rOpaQ3NKKKkPWMqYaRy tMTkZmDKpoYzfktaqDcR8tUIc+iOLpIj6F+4sNxjP1g5BV6KrbwSWKRwQsJjjX2Kjjnj SlY+RCW2ZEWorjDUeaNd+xtiSJ0vysB79djoW6jE4YaFfN/cXeei2gEgHyl45pkR2YpR SH2UfSmhNHtf6o0onoh5EE5nuCnuNiQfOmPRnPdLzvlqhn72Q747tqiU6k8t+bc4aI5n puxD6Xk+78hW3GdZEHN6wIO3m/nztt26/EqiZk3uuAWFqPpV5jTuAWHMVUrNcRjx4NZD pPLA== X-Gm-Message-State: AOJu0YzuRKC2V2CD2mEPTEZ+PTwa+pb2mNkLXUsjZ9G93sUQsecqrbX5 AjhiZEdy0Z/nCYBS/QWuOF8BnIqdh4EldFuLy1s3QTMDaqJRgxrZ9lL6h7pX X-Google-Smtp-Source: AGHT+IGtzGY1r/Ey6eDWiFV4anbDVmrioD8tnnWliCkcJhnnp7ieNqchj1cxlnfA4BmipPtwyVROUA== X-Received: by 2002:a05:6870:a68b:b0:219:8bb1:dbe0 with SMTP id i11-20020a056870a68b00b002198bb1dbe0mr2701988oam.23.1707597983515; Sat, 10 Feb 2024 12:46:23 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUyMJ/CooF1QNuyXGTObFWMvuvkFEmuT//Kug+lC0gcKpihQmxaVZht2CMxcEHCpsOiF5guQFaasdcNG674yFTAYhweQoskYZFRS3Tl62Jk8sdffneBLibhAbqkI6MXFFP2RH/40rPDQ19iBRpZ6//pUGLk44/4InI0FWKmbUDfZMJprVgnw0hci6O35jDUOG1KE8HcUpq9hdRCaJqt4YqMc7Fqsfrt7JEPRNrz0dfpNyLIjIHis5+46b1gH3wqWw2+HP0IkMBTDSUDDg3ZCOYgciZXmRTB8emI50Mnm0QUSM5nOtT0H2l6GBVCmJSu+3dupL9iGOW+8pSqfrPxIOrOFvs586OH0Y7RnaqtbVT+U2ki2qcGmbs+q/v3em7lpGTas5cRM0vrkWHTVu8cQ6JAc1qVGJW7VbJuOyWVVIaOi/Mcm/4N6VUrczhEdH9fkl8+abypCDebn2Ov9b3rT41mYV1XVARDefkAJGORsJaWZFv5c2a2myi2eTLXNve8c7nQgZ20+m2ivRnQAgEk6u1Xg73lBghraDXUp3pOxMfJoicuzKOOI35VDnVrm31QO6SBezpUEmE2mvDDtwLLUz4rEFPw9v+F5J6pBjIlTLyPCA== Received: from aford-System-Version.lan ([2601:447:d002:5be:27d7:3989:2897:88a7]) by smtp.gmail.com with ESMTPSA id m20-20020a0cdb94000000b0068c9db26ae1sm2079526qvk.41.2024.02.10.12.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 12:46:22 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, aford@beaconembedded.com, Lucas Stach , Adam Ford , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 3/6] arm64: dts: imx8mp: add HDMI power-domains Date: Sat, 10 Feb 2024 14:45:59 -0600 Message-ID: <20240210204606.11944-4-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240210204606.11944-1-aford173@gmail.com> References: <20240210204606.11944-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240210_124625_459634_D3EAC3D0 X-CRM114-Status: UNSURE ( 9.24 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org 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 Tested-by: Marek Vasut Tested-by: Luca Ceresoli --- V4: No Change V3: The hdmi_blk_ctrl was in the wrong place, so move it to AIPS4. power-domains@ fixed to read power-domain@ 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 9ab9c057f41e..0730d4cf9bc4 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-domain@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-domain@15 { + #power-domain-cells = <0>; + reg = ; + }; + pgc_mipi_phy2: power-domain@16 { #power-domain-cells = <0>; reg = ; @@ -1889,6 +1906,27 @@ hsio_blk_ctrl: blk-ctrl@32f10000 { #power-domain-cells = <1>; #clock-cells = <0>; }; + + hdmi_blk_ctrl: blk-ctrl@32fc0000 { + compatible = "fsl,imx8mp-hdmi-blk-ctrl", "syscon"; + reg = <0x32fc0000 0x1000>; + 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>; + }; }; pcie: pcie@33800000 { From patchwork Sat Feb 10 20:46:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13552317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74A85C4829A for ; Sat, 10 Feb 2024 20:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9+zJkRDKbcj9pxoiC26dFmgY8gB2zDO0mb76JRxXtGA=; b=Qf04Ct3mcfDhSP PX1X3PvfOESm+ql0L2TT2AGGMYR1gg83TMPQhkpXrkdFkoWbuHVmqAOQzeKU1X24l0N1HBssK5Q6H /wIXN4lk7AYkKCTbEJIppFIb/ZGV9SM7W1fjTP7/DPoBHeVclvVudUsN/uYbrGlKH9vWDjs6JhYRy MLdErS0hMqy2q4rQFtqF96TnbIphs0hGAHOnerYJap98cVReQNf5iT5F0leJdq6BwZSjUjAUFZz5z tAuH/6FJXKMQ4LYyEAE3YLlelkNuUCvdGuBwg2DlriIf7NiwYyV1h/Qc5gscUoiphTN0Sh8Safnez Gbn1ekxMeibaAYOjo/1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuF9-0000000208F-3xly; Sat, 10 Feb 2024 20:46:35 +0000 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuF2-0000000203q-0TVH; Sat, 10 Feb 2024 20:46:29 +0000 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-68cc87d4aabso11764186d6.1; Sat, 10 Feb 2024 12:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707597986; x=1708202786; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rMB30/edT3Hx3KxbOqd/+Af8cP2PAzP5WuJfM5yzKlc=; b=ez/u25Wk10T5+EqqwDN1GKSJdfa0yI+1nDodxafRD+A3MHTg0CGF8rwQ2U+LYrX59Z LCYJq/PYVXuC4dQqwG4/Y+/KJGYCja0ivz+zBhj94ccFFrUj3Q48dz4fC/FiLOzqWacm EuOIH1Z+zKI/ry4TB6e/W/2kz1lig8niKLIio8RKf6iMnmMo+6tawYugCAxi8Dx63gRg cy0lckogR0uLPoFlEUKiiQfDtj/puUGpQ0kbXghv0IPhq6qE+qR2BcvEwn4mE3mvl67H 4/RmL4eAj2AVlT/qjBIWynHbFSy+eGCfqcw1mYSxjNlDM3Q6Z4UBrR4EkMPxwZ8Y8wcQ ikRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707597986; x=1708202786; 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=rMB30/edT3Hx3KxbOqd/+Af8cP2PAzP5WuJfM5yzKlc=; b=JRfPB5B5DwxQMHUm2xhwbhTkaB+GAh6SvRzYJY2IUyqCoo9RO627EVjstemhMta8kj kCNISVPZbwotLkOZ6Rqraap1Hhs6YjlkJrAVRGvdcqW7kL5CJPktkQ0Yh0KhpYzixdK8 7hLThlQXprZ7NqRdhgffWz70atQbQzU2wfpRNdvCvQuPzg14VPB7FWmb5ZrkYmw3kHIw 1SaZDXCYebJvJzC0KvBdB/7xnayNeMzN1Ztzi/VhG6KqLpgjd2jD/OE8QFXaDWECKIW4 mgNXiYwgCq7alJe1UA/82G7da6ylAOCcAajx07daiQM7Fhi/IDtMmIoYVKaJcWALXxyz fO8w== X-Forwarded-Encrypted: i=1; AJvYcCVNpMkBeIoCF6a66ugSpGzO6sL/jRb+a4aUN79HgdaEcjrqL6VcCcxSIKXZtb2gMeniKBOMqHlNCNC4Nab1Tp38dkTcHqOG1+24BjGPWw== X-Gm-Message-State: AOJu0YxQbGd565+OQ/wLI38yt/uUW+jK4/GWFO9objTjAAGrBQsTygHQ sKvwX27zI4UxqsvvGGa8Ut1CBNNRg+K/Sy5/XyyiSwvbHe2PRlvqAmt8DsMk X-Google-Smtp-Source: AGHT+IHjWG+LOJylc03v3MtAQG3d2LHUxPk6oYRnsBvvHyMXOgvEM0QXrtAjkmdVQ3pkSzzt95ttLQ== X-Received: by 2002:a05:6214:1c05:b0:68c:74a7:9e21 with SMTP id u5-20020a0562141c0500b0068c74a79e21mr5329427qvc.3.1707597986373; Sat, 10 Feb 2024 12:46:26 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUXN808d0aRSjf5Bqe9DdeRZfOtW9W4eMEJH40oYyA4zjEbOARPlzT0KP9a+s/pLSAVsPaJKqHLxnvXiz4NixVZHlAzJfXMlz5twjePJSsPp2R7zb+6mQUw2HBcZCi6zFxqWlFgeK8Q2G+m5GppmxP4SsOQXiNzWhF8Ans9O/Xdr2xL4ZjqJslLjH3pkmg/5s8vjPeN/9MSpysmtmRfxYLdGASQ8BHwsm3kBcWr+y1ZTLcjt3mmsSmU8/0bdFghx2CM4HPcbnrxbk0ZsjYcBpfHe99BMcO+BslMOSsHmdvh2bXd8+JxWId2ZzaTfTW7VFpX88ckWlWiMnjBB4sN1hPCbPdfuuUeY3sMYEDmrUm9s3e9UQHwi8GU9DKdJnrVDoz62ZEgL0GTq9V1xp3dliHeDpdND5rr7hxr3+1KmcZeodj00EbfowlmMPL80zapmgW30jjYXvvE8bu2vKeg3T0BwX49yxDt+EvSh0oVla1EFzxJlvxUiP+Yl6vLdaRJXk9pQD0CEfBLg8crAMFtmQSQInW/rB+G3+ZhVY7D41DPcJ5gqyFXx7KASGMKk/cXCcHgxpDNgwXeaRAWNG2719aAFem6dUxzveffZNXcU0yezg== Received: from aford-System-Version.lan ([2601:447:d002:5be:27d7:3989:2897:88a7]) by smtp.gmail.com with ESMTPSA id m20-20020a0cdb94000000b0068c9db26ae1sm2079526qvk.41.2024.02.10.12.46.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 12:46:25 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, aford@beaconembedded.com, Lucas Stach , Adam Ford , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 4/6] arm64: dts: imx8mp: add HDMI irqsteer Date: Sat, 10 Feb 2024 14:46:00 -0600 Message-ID: <20240210204606.11944-5-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240210204606.11944-1-aford173@gmail.com> References: <20240210204606.11944-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240210_124628_196229_8E632448 X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org 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 Signed-off-by: Adam Ford Tested-by: Marek Vasut Tested-by: Luca Ceresoli --- V2: Add my (Adam) s-o-b and re-order position under AIPS4 --- 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 0730d4cf9bc4..9b8ab367d774 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1927,6 +1927,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>; + }; }; pcie: pcie@33800000 { From patchwork Sat Feb 10 20:46:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13552318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E54B7C4829D for ; Sat, 10 Feb 2024 20:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NpViNf5AWCC70cFW3EypPptUKqwzI3pwhjf+IjHD0d4=; b=wj7RpqbS/mxuEt XOUzI2HDMGn0fdjGqNcdjXW16dT523INZLsGr7te0pK5V7v2XyPK+jQ/yqx1HNPnTwaMu9B7Om9P4 S17HXSAOsXXbl4kiuIXfMPK+YBMc2EFXCAyoMoG0mzjEl3Xg/a33j+xCK7oHsX3reTKWXgpEC0YiQ R86GLaeFG8/fKjZJu/ENY7QP+tFcbicikmUkXD9lp0eCg+/ZxEy98lfWEtSJvfgxBUhAF4H5d8nMX /pumJrJehkpw3nGIHZoLQwLY7NQ3F+JNjzgjQHjeoe+7GwrkBxCEQqnmGCbSfAiL4U5vRnAq3nvdX mSdJ+5n9LEAKXIKCaWmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuFF-000000020CC-1OAy; Sat, 10 Feb 2024 20:46:41 +0000 Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuF5-0000000205p-3a4I; Sat, 10 Feb 2024 20:46:33 +0000 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-59a45d8ec91so752858eaf.3; Sat, 10 Feb 2024 12:46:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707597989; x=1708202789; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X+jee4efnNUiNV1RtX5y1A9X8AcFgWXwTvWCcq5t/8o=; b=PuxXpjCZ8gfC5oLFfp+UkbKFINF5oPffrVJQ9iODAy0CHh4czMQRauad4/b3SWHDiG xspS5WrZ6/hgIj3W9A/2Crx+cu+Zv7SHZXzH15PplIL5EgMhVr0FFTwCFNbLIkul500h uRBQ0HgbMZJc9nprc00EUSpqjOJzsyw8o5jo6GW+cmcLmfT92izmjovfaI9+Ih4LBbZw WDYBOWie6RnBY1j2vYEcHQ/UyrfVgevXpXHh8qIYjyTP3rDwAaw6oaaYX5+ne183UIX5 ssK0nnCSMw06qJA6t3/IwWF5OBIqh/Qf3nex2A3EaaTjgikw8j6O7rMwTcbXm8ON0nu6 iv4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707597989; x=1708202789; 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=X+jee4efnNUiNV1RtX5y1A9X8AcFgWXwTvWCcq5t/8o=; b=HwyoUjQ2DBLUWC3iitbR+sEoOUFRjFsgUKGE1gE2dQhTL57EGykaJxR15o7Jnb1IZs pgMblVmYwTQqHUMDcjmWlfTcd1WiGGJdSAoL8JX2tsjpNn+Sg9ZuqQ6fiyJzhIU168/d 5DhzxpBRT9I067y8VkEe9XpzywYA2tHBx02otwy3u7+AVQdsgiXNhFty/9gE5FMxmCK1 kYbiicP1Ov40GVNGRA8WRIoObI1/nuVpik8McZCsvjrda6oVzdgQb7ucN6nsapNBUI/m iB+mRnSD+2ckzRU0vLj9H6Q7FtOMnZb0hjFO61FKo4RXoDYfN0MU6qFOUcx6ZA10qlTX 7dwg== X-Gm-Message-State: AOJu0Yxr+ALoSyR5w1aWHNGbJcW/q2ZbG2TOfwqelm8av01UjhtHSTSd x1i+CHXanZ10Sq6EXI8rsDtaehJOGLH7GRrJMbXSg+Vr5N4DqX1iJp+BszbA X-Google-Smtp-Source: AGHT+IE+7Q4zjnqD99X1wOCIWZux1UlC3g48TiSZqsWGyoEcQOAOcEZ9Sgyjp6zyB0blK/ckLz0q4A== X-Received: by 2002:a05:6358:61c6:b0:176:5c75:b348 with SMTP id x6-20020a05635861c600b001765c75b348mr5305197rwx.4.1707597988924; Sat, 10 Feb 2024 12:46:28 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU/Funz6vl4Z8HBiKu/tAOPe+UvMuiG/UEkDEf0wfP4rrmmLME6f5IAZc3kZr1cpU6lsLRwPHo42SbVjrjngMsy4dvhblCcqsGbFjxGQYVb3hy/zmhyi/Q+eOjGTo0c0dSZxBar+5mwsxWNbqO0s7XHwg1hudShO8rTwJulSyD+LzqB+64kPrjB3qa7t0v5TZLy1ckyoshpSildO27RPlSrYITgLtoVfGTPmG4hmhlbuD+Tre+wdv1w8PiRh2AgAfOf2eTjkGTP+CZWpuQGLa9jsrzQrUT1/sljK6GA0ZToA/b3IU47Prq8OSjj7LxPf0tRZz7WNCNpa1aEpTw4bjOZsHXLtEUjsbuiMN3QJWQ4PnDahI00sE1JP9SDA9CEeMraXkuCyu1Nk0Gd+BFkS8/eQm4cdRaM6T88D0HO1KV71B3vXl9zj8LmLahFDscex8oAUSY9/br9NOcaf7pQKMktQg3YpzxcMwL2jf6PtVRL5cNrraGggfGzEDhmVipDzK3FY8NrxMSs8kGhdWFPN6+8eKwtOvefnR++wbFLQNdQbuC51lMPjve2YgpUsKm1nZqJJUUcywNFUOBQA9ysRS01KfBND6jm5rghpnToD8Wwfw== Received: from aford-System-Version.lan ([2601:447:d002:5be:27d7:3989:2897:88a7]) by smtp.gmail.com with ESMTPSA id m20-20020a0cdb94000000b0068c9db26ae1sm2079526qvk.41.2024.02.10.12.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 12:46:28 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, aford@beaconembedded.com, Lucas Stach , Adam Ford , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 5/6] arm64: dts: imx8mp: add HDMI display pipeline Date: Sat, 10 Feb 2024 14:46:01 -0600 Message-ID: <20240210204606.11944-6-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240210204606.11944-1-aford173@gmail.com> References: <20240210204606.11944-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240210_124631_931329_B0D25341 X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org 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 Tested-by: Marek Vasut Tested-by: Luca Ceresoli --- V3: Re-ordered the HDMI parts to properly come after irqstree_hdmi inside AIPS4. Change size of LCDIF3 and PVI to match TRM sizes of 4KB. 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 9b8ab367d774..013c2d9824cd 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1940,6 +1940,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 0x1000>; + interrupt-parent = <&irqsteer_hdmi>; + interrupts = <12>; + 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 0x1000>; + interrupt-parent = <&irqsteer_hdmi>; + interrupts = <8>; + 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>; + interrupt-parent = <&irqsteer_hdmi>; + interrupts = <0>; + 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"; + }; }; pcie: pcie@33800000 { From patchwork Sat Feb 10 20:46:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 13552319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B449C48260 for ; Sat, 10 Feb 2024 20:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Af5sI1gfdPUpNCQUUSnL7hiaKp/0ZlrQJ73MKFqux3o=; b=JkTX1kNQbX0xdT FBajUPI4wZVlTrrSRA41M/+OrprTzuU/84WN3s22NsaxvoTmYOgpLeMRYn6DFaCAFwCBaAgp34uev c05OU79HOOPIBTnsTZjEjW3srNXx7biKxmfN6QwsfY0lvotWP0hYR7UfFMvxMBeCfFlsJKdi6eCPq r/yr7w90Ld96Gqhd+jomVSK8pLK8xEFmJzERDbL7wc0ZDOYGaZEU6e8gkL2Ev6HvwC96ZWOH9/CPe qpgkcaJo7gnoTK5FvsJaH2o+eiX87g8XB+Sg0HH8nWSccRaeiXlEMiOZGCl0tRe6FApb6APKzFcSc JDjSuDy1C6qo2FQQeg5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuFH-000000020DZ-15Mu; Sat, 10 Feb 2024 20:46:43 +0000 Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYuF7-0000000206b-1bTJ; Sat, 10 Feb 2024 20:46:34 +0000 Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-604819d544cso20932327b3.1; Sat, 10 Feb 2024 12:46:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707597991; x=1708202791; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jMNqmGpCpYRyGD3lm2gu6alF/32hYvXVEyCc/US0g+U=; b=AtcBcUC7DPusaqdCtlSmD6PdUAmIPpl8/+pJITSsC64K4YFbbHgOdtthl6UIJKbtNe XdRWqT2HVvp+F8h7g6R53BVjJY1x+hTOiFRcbzPNpp7X/XXWIddqvdRtuemYZbZhFhn7 mphrpFWjg3kkfyFCsX6EUqGuH8Yj55Um8y/Wu6AYyfhpdRQKbb51fXCz7SbJzvna3QFC ivzHbgXUGeCWWDip9B6oGCpuH1pVbpISZWoMuNsWpD8NlWMAh2v3FhtZSD/ZM3LJH+pY 2klHmjZNPfBx8QZoDvaiBFhUgqFpe7sraZHB90ZP63OJYe/u8PguMAUHqdJHHhkiQ8jx OgZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707597991; x=1708202791; 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=jMNqmGpCpYRyGD3lm2gu6alF/32hYvXVEyCc/US0g+U=; b=M1ft7hw48/9AXT3Kjxo9ZJwH/2pxFlPH8wwtP6UroAHyI6UfekEqszCE5iHGEExcYi o6KV2eIoNFUTL/Wjb2AuufDfaJKs8Z8MaPPkQJ+TSCp37FxgdbRdsXVqqBNOJ3HOIxGw o1rokkU0FGg4FVNqY8zvzn4T2XqymEyJBPh7aMcU9Tt4fzDMy6aZAgqZ9KHLKnynv37s +cNjAoCtUbXK8irFb7ZL2qlMNklUhk9ZSwKYVe2WUnc1vKesCrMPhZHP4Xp/uJBgiVBJ UwpEd80vonacC7t2wCjp5aQ2hvj87KBH2R6NhQ/xdrKWGOQ6YHg5rXF0nP42seWW5vMY PZ8Q== X-Gm-Message-State: AOJu0Yy8u6TE133PZ3IX2Pt/r+gD27v6dFdqEEeiJ5GvGdNZ4xg7G58Y EA/A2ekMzI86FWRh4ngL6DDVUmAqPGIlHOOpjHsd+gDQ6boO//Ijgw20tG5D X-Google-Smtp-Source: AGHT+IHgx712Qt0uPzY3BKOyK91B3LD/rc1vFptzX160m43q2KsKblVYhW7VrPbTHGq3SN6LhllN8g== X-Received: by 2002:a5b:b0f:0:b0:dc7:49da:5f4 with SMTP id z15-20020a5b0b0f000000b00dc749da05f4mr2754107ybp.11.1707597991484; Sat, 10 Feb 2024 12:46:31 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVR6ncD88zt1yVh3P2jEjcgsr1octwT0Xcboct6HI+KW6uiASuYizor/YMwjA/4YBU7J4v1FeUR88pazimK2bL68tdOTAyYfSb/ds5aUAx6J3lpvN3WYqFOzuEeXHYB/W3ViaxfIuTRqjI2uvi/EBLHTtfOj7ukXeSOYe1Nd6tfJNwG+43UDTCvXyYVRfkTq8BLyrBa4y7J7BXkjqZlYUozI8x3Pn1Fa328zhGAdvkbzCQg6n2atr4pRUM/Bo6q7Z1GvJIbLKbsZsceiuOZwRdXAeKDfpwXlKYkI9ShmjInX45mUX/lvzwd6ZLlSSKsOq4duF7Mv7R6AChrWWH4kc1+DQrVPF8XXaLdwJe5ieaBOhg8CBmluRLRab9eqRpBLPcKu2woU8laW3ZtwQ+kPiYgBjdaqeNIajdZScZFNL97YFE15YmF3+VYdJdWan39AGaKOBxKWqgT+7q/r6Hq4ul8ujbaV7NessyP64Q6NDVjKWYiQJByNU+/3U3FKwgJVt7rOsuA3JbY+VvQc3hub6I6HP2RhG3F2vkTGZmC2z0bn6UsuSW3yw2H1Nfw5hOUnNJaitQv9JhExulkZufn1RP6CfX1xcepclF61Hg4s8OU0g== Received: from aford-System-Version.lan ([2601:447:d002:5be:27d7:3989:2897:88a7]) by smtp.gmail.com with ESMTPSA id m20-20020a0cdb94000000b0068c9db26ae1sm2079526qvk.41.2024.02.10.12.46.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 12:46:30 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, aford@beaconembedded.com, Adam Ford , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , Lucas Stach , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 6/6] arm64: defconfig: Enable DRM_IMX8MP_DW_HDMI_BRIDGE as module Date: Sat, 10 Feb 2024 14:46:02 -0600 Message-ID: <20240210204606.11944-7-aford173@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240210204606.11944-1-aford173@gmail.com> References: <20240210204606.11944-1-aford173@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240210_124633_456358_92F07F22 X-CRM114-Status: UNSURE ( 8.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Luca Ceresoli Tested-by: Luca Ceresoli --- No change since V1 --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index f44b3abf3cef..03ba9e89a0a5 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -886,6 +886,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