From patchwork Sat Nov 20 07:34:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 12693166 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 9EADEC433EF for ; Sat, 20 Nov 2021 07:36:31 +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=zzX//RoNM97sAOudklblp/tVb8Cr17cDD6g7N6fLZUw=; b=Lr4J2GSlgqLPHT kE2K09uyjW4lhUWgBeVHlWvqoZtknohl/BKBycK5KrF6l51MjALHbiXxFn2d40syf8HlI2mIfoMkR P+OzrAMjUGG7bj1PtY3/Aa253Nk4Na9A3TN0NO7oLN1DQ+lq/tNGRrDpOkYScyZLl5sbtgZjUDTHj yYPrNnv3zTbFPxcU3077OfbdWVD8U7tPhJJonZpUy7jzkijha9P6v0JdwPew47ctAv3RBc2/hKQuS 1XAWvgpbrV/a7f/NFFSdvE+FNUXFsx8pLg5QxSNPIYZK9TGuA6js9NEOCUZLCw9Vlou3cGi6GpUuq DzX8ZuUWmPnNlADyMZOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1moKtw-00C8vW-KT; Sat, 20 Nov 2021 07:35:08 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1moKtj-00C8sv-Cj for linux-arm-kernel@lists.infradead.org; Sat, 20 Nov 2021 07:34:56 +0000 Received: by mail-wm1-x335.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so9194991wme.4 for ; Fri, 19 Nov 2021 23:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AdnhaQhzfGCZNq/tu9wW0n+da9d5ZXWaDiFgN3D1ig0=; b=AML7rh3/uPAl+zqRmG7YQFDf8fuylqlF2+YRC/reS0GFrRBeIoRh+pbHtlUIOgdR21 Bh0fWatFQZWjahSp26vrv6Li6jSTZwMdSHwLi52m91rPaP4H0dhr/tJF0jojow6zohYW ipxtj3XuXQmXtG3AVwfWP2j3M4uz9vgipxbaVJBPVwbRrtj8ppOf+JcIvzAjBeEtN1Ch ujb3bCPNEbcKLhtv6kA2mGitKVvftvcOD711eTPVUfEzqkJnCq61+0vIv7iThvKbFgFY SH2ByDZfFqG8lGnbwAqHP9T4rHkOL9KdNsuhgHLLA6a4Tl7+nSsFl+iRXiThI/CFKwa0 8OQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AdnhaQhzfGCZNq/tu9wW0n+da9d5ZXWaDiFgN3D1ig0=; b=EmMcPcMlDUuCAcX9FesvD5Mepp4/8FYrboXOjKMdQ5WgeSrKdc0NiNOssdcb8rFVHT dwln5R2EWkJS9L2xbOEecRfUhPh94wzoX/GljZgWLILLpRvIz1A4HnnhPFUnOpqhLjfa IFa19d1Xtqv1W+87JW28r/6IXI8cPGtNABj59AkxbUOinoEbDlPu9LcMG5DfyedmfJuk 8QySbzakdr8NKm1NzwFmA8EWQnQKD/BE1sbO7Y84zNBOaUsJMnoGZNsA4R7y1tz18FRt XxaCmlxP4A+/EerGp5EPhxtOGcJ7FEzZI4E6TbYnSca6wNz59wefeJcVX38hamtgcrJ3 U2IA== X-Gm-Message-State: AOAM530oKF+yZPvoDrwlBWNEmRzys6XYIb9z0xuFkQa1Vo67OBHYZYlt NcpxDt1XnOXiyQ/y2GjEs28= X-Google-Smtp-Source: ABdhPJw0EDXD2g6MUp3ag4xl2QcO+EC2a77rBd/hj6pxFRbbup6+sYCfeMb3J0ikgEdF4pjc9Exxhw== X-Received: by 2002:a1c:f60a:: with SMTP id w10mr956018wmc.53.1637393694006; Fri, 19 Nov 2021 23:34:54 -0800 (PST) Received: from kista.localdomain (cpe-86-58-29-253.static.triera.net. [86.58.29.253]) by smtp.gmail.com with ESMTPSA id a141sm13776345wme.37.2021.11.19.23.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 23:34:53 -0800 (PST) From: Jernej Skrabec To: mripard@kernel.org, wens@csie.org Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 1/2] arm64: dts: allwinner: a64: Add CEC clock to HDMI Date: Sat, 20 Nov 2021 08:34:47 +0100 Message-Id: <20211120073448.32480-2-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211120073448.32480-1-jernej.skrabec@gmail.com> References: <20211120073448.32480-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211119_233455_452594_F2D335BA X-CRM114-Status: GOOD ( 12.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Experimentation determined that HDMI CEC controller inside DW HDMI block depends on 32k clock from RTC. If this clock is tampered with, HDMI CEC communication starts or stops working, depending on situation. SoC user manual doesn't say anything about CEC, so this was overlooked. Fix this by adding dependency to RTC 32k clock. Signed-off-by: Jernej Skrabec --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 5ba379078500..741bd19fa8ec 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -1220,8 +1220,8 @@ hdmi: hdmi@1ee0000 { reg-io-width = <1>; interrupts = ; clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>, - <&ccu CLK_HDMI>; - clock-names = "iahb", "isfr", "tmds"; + <&ccu CLK_HDMI>, <&rtc 0>; + clock-names = "iahb", "isfr", "tmds", "cec"; resets = <&ccu RST_BUS_HDMI1>; reset-names = "ctrl"; phys = <&hdmi_phy>; From patchwork Sat Nov 20 07:34:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 12693167 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 2DC2BC433F5 for ; Sat, 20 Nov 2021 07:36:39 +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=Rd06Ey8TpUMXL3U2PFOB2vFowsXmt79r+oo7WmOy1TM=; b=It6wOUvldtlxva ksDfUb/T980J9Bi3Q5wVAqN+jomd17DBI3OjYDqvofK2N26TvJc64aclZcmNWp1Z/4X70DoP3U32P 7Jsz7KRZaJOtJ8rGN1L5FIKarx9ReZVZRw/FDuwFQaxUI/ICD8gZwjfMukcCmbrg6cOYf/+rI0lAm GlRPq8i06/fVyToTCKbtrPZlcCSkmaLAVKZdZBDg4qYTvauJ46Mey4kyEDt3+vlCQWgGPbxWwqLkp LIZRGzrUaRv0itI+uuGt7iSzxtxZzF7yp+qEwbzvr4xZ51WgAjNWvg5WUxMsCyGCp4HxkQ4ABkE7S 47/Vjs7TbMzo9piQQvYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1moKu8-00C8ws-Fc; Sat, 20 Nov 2021 07:35:20 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1moKtk-00C8tA-82 for linux-arm-kernel@lists.infradead.org; Sat, 20 Nov 2021 07:34:57 +0000 Received: by mail-wm1-x332.google.com with SMTP id p3-20020a05600c1d8300b003334fab53afso12220193wms.3 for ; Fri, 19 Nov 2021 23:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OM2Q2y6CgmId2R4mi5bkqpR+tR4JTdqKcUf7G8xj6co=; b=jKs3FDya/Z9bazr9ZhSJ0Rgg6S+9NH4+HyfOx+9ft1ecocbFvoI+UtITN0//G9LuRp DuQ4Q2AlQZKArwDuJT7opw6uBHRDxU63pOAsbzsmtLh6MGUtHKRHyZdP6Y1OI8tPObSk ULRStBmJ5EF0zvi3FuiX2u3HVfOWEfmdx4zobd2qbg15yoQCTlzScPvq5Hr7YeL218GP hZtCTHXdM68ZACyttsJnq5wWpavb+WvSU6mhKFNTBdydj/Gozq13slrTgWPPb/RqLafj wyZCwVtNVwWIPEU13DwnfQ2D3vMyyw0+rdPoc+2Pje4DFJEXgikUPTybkIvGLTlZ6cgF LfBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OM2Q2y6CgmId2R4mi5bkqpR+tR4JTdqKcUf7G8xj6co=; b=G6tbOR7f7jApoLjJ6QUfy2utbjxOx791qYhDkYMSrAulPk2WoJCCf9XKq3CyN6+VRm OC9vD0vhNTiBz+9jxa64F0DHDlNvATn0ImrhB0qC8/isH7UXk61fjOeUEU8mf+KBLVAh W/asXiRJwUPmAoFylmoLD7QCz+0KbIhp4JYWsk59/qEbjoCW5qXJMVQ/SgjR4SYBEMIy a8yOG+Z46195yR8AW3+KAfgiqeBmGcjld5CyMg0DnO2wOg362ojBWXaaruDjMFz852e/ 8WaAIxLwDHTvjmLbyUJtIAiLF6i8+lK6IiyFy6jNBibTlnnsx7/NNErYLr/bFvXM1QQb /yiA== X-Gm-Message-State: AOAM532mdMNlrH62jCI3zO3x0UhbGGsK7U2gVuT4P3q0yMdaJNZ3Wt5U dI4RSvP1VlDMjmd4ku4AOeQ= X-Google-Smtp-Source: ABdhPJx6qjUexfTH0BphOvHctVVn/Kt/mw75BqIG0yjsu3k9x9MB0iSsIdkwPFhECEC7ZShYtKCarA== X-Received: by 2002:a05:600c:2205:: with SMTP id z5mr7674255wml.40.1637393694855; Fri, 19 Nov 2021 23:34:54 -0800 (PST) Received: from kista.localdomain (cpe-86-58-29-253.static.triera.net. [86.58.29.253]) by smtp.gmail.com with ESMTPSA id a141sm13776345wme.37.2021.11.19.23.34.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 23:34:54 -0800 (PST) From: Jernej Skrabec To: mripard@kernel.org, wens@csie.org Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 2/2] ARM: dts: sunxi: Add CEC clock to DW-HDMI Date: Sat, 20 Nov 2021 08:34:48 +0100 Message-Id: <20211120073448.32480-3-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211120073448.32480-1-jernej.skrabec@gmail.com> References: <20211120073448.32480-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211119_233456_307115_90C282DD X-CRM114-Status: GOOD ( 12.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Experimentation determined that HDMI CEC controller inside DW HDMI block depends on 32k clock from RTC. If this clock is tampered with, HDMI CEC communication starts or stops working, depending on situation. SoC user manual doesn't say anything about CEC, so this was overlooked. Fix this by adding dependency to RTC 32k clock. Signed-off-by: Jernej Skrabec --- arch/arm/boot/dts/sun8i-r40.dtsi | 4 ++-- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi index 1d87fc0c24ee..f10436b7869c 100644 --- a/arch/arm/boot/dts/sun8i-r40.dtsi +++ b/arch/arm/boot/dts/sun8i-r40.dtsi @@ -1212,8 +1212,8 @@ hdmi: hdmi@1ee0000 { reg-io-width = <1>; interrupts = ; clocks = <&ccu CLK_BUS_HDMI0>, <&ccu CLK_HDMI_SLOW>, - <&ccu CLK_HDMI>; - clock-names = "iahb", "isfr", "tmds"; + <&ccu CLK_HDMI>, <&rtc 0>; + clock-names = "iahb", "isfr", "tmds", "cec"; resets = <&ccu RST_BUS_HDMI1>; reset-names = "ctrl"; phys = <&hdmi_phy>; diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index c7428df9469e..d1e974886fdf 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -813,8 +813,8 @@ hdmi: hdmi@1ee0000 { reg-io-width = <1>; interrupts = ; clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>, - <&ccu CLK_HDMI>; - clock-names = "iahb", "isfr", "tmds"; + <&ccu CLK_HDMI>, <&rtc 0>; + clock-names = "iahb", "isfr", "tmds", "cec"; resets = <&ccu RST_BUS_HDMI1>; reset-names = "ctrl"; phys = <&hdmi_phy>;