From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 From: Alexey Sheplyakov To: devel-kernel@lists.altlinux.org Date: Mon, 3 Oct 2022 18:02:19 +0400 Message-Id: <20221003140226.1064966-24-asheplyakov@basealt.ru> X-Mailer: git-send-email 2.33.3 In-Reply-To: <20221003140226.1064966-1-asheplyakov@basealt.ru> References: <20221003140226.1064966-1-asheplyakov@basealt.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: nir@basealt.ru, jqt4@basealt.ru, rst@basealt.ru, sin@basealt.ru Subject: [d-kernel] [PATCH 23/31] drm/bridge: dw-hdmi: force ahb audio register offset for Baikal-M X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2022 14:03:45 -0000 Archived-At: List-Archive: List-Post: Hardware revision 0x2a needs a register offset. It can't be auto-detected: to figure out the hardware revision one need to read HDMI_REVISION_ID register, and to read a register one need to know the register offset shift. Hence the correct register offset shift has to be specified in the device tree (supplied by UEFI firmware). Alas the device tree blob passed by Baikal-M UEFI does not contain this regshift. Hence force the correct regshift for Baikal-M. Signed-off-by: Alexey Sheplyakov X-DONTUPSTREAM X-feature-Baikal-M --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 1cf106338315..cde83c06a48d 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -3574,6 +3574,11 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev, } else { dev_dbg(dev, "set audio.regshift=%u from DTB\n", audio.regshift); } + if (of_device_is_compatible(np, "baikal,hdmi")) { + audio.regshift = 2; + dev_info(dev, "setting audio.regshift=%d for BE-M1000 SoC\n", + audio.regshift); + } hdmi->enable_audio = dw_hdmi_ahb_audio_enable; hdmi->disable_audio = dw_hdmi_ahb_audio_disable; -- 2.33.3