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: Daniil Gnusarev To: devel-kernel@lists.altlinux.org Date: Mon, 14 Oct 2024 18:02:01 +0400 Message-ID: <20241014140221.535985-21-gnusarevda@basealt.ru> X-Mailer: git-send-email 2.42.2 In-Reply-To: <20241014140221.535985-1-gnusarevda@basealt.ru> References: <20241014140221.535985-1-gnusarevda@basealt.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [d-kernel] [PATCH 20/39] 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, 14 Oct 2024 14:02:08 -0000 Archived-At: List-Archive: List-Post: From: Alexey Sheplyakov 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 627fcff89c6de..34f35dcd9a867 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -3565,6 +3565,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.42.2