From patchwork Mon Aug 29 23:41:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 9304629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2040A60756 for ; Mon, 29 Aug 2016 23:41:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F893289B1 for ; Mon, 29 Aug 2016 23:41:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 041C6289C3; Mon, 29 Aug 2016 23:41:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A3B7A289B1 for ; Mon, 29 Aug 2016 23:41:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E3EF46E240; Mon, 29 Aug 2016 23:41:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x233.google.com (mail-pf0-x233.google.com [IPv6:2607:f8b0:400e:c00::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACD6C6E22C for ; Mon, 29 Aug 2016 23:41:49 +0000 (UTC) Received: by mail-pf0-x233.google.com with SMTP id x72so1040298pfd.2 for ; Mon, 29 Aug 2016 16:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ffX4t6nTbBFder3hJ6WrPBjCEJ8CGs1XLKhzMuUy+aI=; b=ACrnKTCIr163mf+tLZQjfH/UpIzJqcZj8amDUuHd52NVyB8l5a0x1Cu3SADhPvnL42 23toM91Xbmpew8+2NZ7TNz3yspo5l3VVhaXu5yjtLP8nyWR3deFismYk3w8jLWSIPNwA /nxa3ZzfP0aMM++I54l4MQ4PLpFoUHrVPRhJ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ffX4t6nTbBFder3hJ6WrPBjCEJ8CGs1XLKhzMuUy+aI=; b=NHEg35LeNtIZhu+IapfGr43ccXQz3vRI/lZTT8A0zGzXFXfudY2tjW5yE5MnDHxbc+ WlT3VELdvb7sFDKjEAWVipKbI/rw+onoD74IUK+uGLO6Krd6LSqG+EpJKB92BqymFcjQ d5+Ezh46hsgsL11VVScdbsZLMrN5ys/QM8TFKdHNN4Shdl2mY3qLlEwUWev6+UxICXcG tZJo2RNXyVhR/RM7DG2GrS8jYjbbDEws/Xb9D9kwnqVl/JfwbmaX4e5TbDQcNF3l9Mhi RaKps9DhbrWVoQXrI8eZH3K8J0stwEahds71N96XQcscOzbnGCsUoP6vtf4ifW7zWvm/ ZFVQ== X-Gm-Message-State: AE9vXwPIJtWugBoueK9MMoEuaa1XtDWij3DVEPEi9KW1YZTK3zBxsx1FSuvuUb8sVP5nCbBj X-Received: by 10.98.81.1 with SMTP id f1mr1040138pfb.35.1472514109317; Mon, 29 Aug 2016 16:41:49 -0700 (PDT) Received: from localhost.localdomain (c-73-67-244-238.hsd1.or.comcast.net. [73.67.244.238]) by smtp.gmail.com with ESMTPSA id te10sm51873603pac.4.2016.08.29.16.41.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Aug 2016 16:41:48 -0700 (PDT) From: John Stultz To: lkml Subject: [PATCH 4/4 v2] drm/bridge: adv7511: Initialize audio packet on adv7533 Date: Mon, 29 Aug 2016 16:41:36 -0700 Message-Id: <1472514096-10915-5-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472514096-10915-1-git-send-email-john.stultz@linaro.org> References: <1472514096-10915-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Cc: Andy Green , Guodong Xu , dri-devel@lists.freedesktop.org, Jose Abreu , Wolfram Sang , Mark Brown , Srinivas Kandagatla , Laurent Pinchart , Andy Green , Zhangfei Gao , Dave Long X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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" X-Virus-Scanned: ClamAV using ClamSMTP From: Andy Green Set the initial audio packet settings to allow the audio driver to work. Cc: David Airlie Cc: Archit Taneja Cc: Laurent Pinchart Cc: Wolfram Sang Cc: Srinivas Kandagatla Cc: "Ville Syrjälä" Cc: Boris Brezillon Cc: Andy Green Cc: Dave Long Cc: Guodong Xu Cc: Zhangfei Gao Cc: Mark Brown Cc: Lars-Peter Clausen Cc: Jose Abreu Cc: dri-devel@lists.freedesktop.org Signed-off-by: Andy Green [jstultz: Forward ported to mainline, changed to use register names rather then hex values, and removed config values set by audio driver.] Signed-off-by: John Stultz --- drivers/gpu/drm/bridge/adv7511/adv7533.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7533.c b/drivers/gpu/drm/bridge/adv7511/adv7533.c index 6798ecf..cced7c9 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7533.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7533.c @@ -104,6 +104,28 @@ void adv7533_dsi_power_on(struct adv7511 *adv) /* disable test mode */ regmap_write(adv->regmap_cec, 0x55, 0x00); + /* hide Audio infoframe updates */ + regmap_update_bits(adv->regmap, ADV7511_REG_INFOFRAME_UPDATE, + BIT(5), BIT(5)); + /* enable N/CTS, enable Audio sample packets */ + regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1, + BIT(5), BIT(5)); + /* enable N/CTS */ + regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1, + BIT(6), BIT(6)); + /* not copyrighted */ + regmap_update_bits(adv->regmap, ADV7511_REG_AUDIO_CFG1, + BIT(5), BIT(5)); + /* enable audio infoframes */ + regmap_update_bits(adv->regmap, ADV7511_REG_PACKET_ENABLE1, + BIT(3), BIT(3)); + /* AV mute disable */ + regmap_update_bits(adv->regmap, ADV7511_REG_GC(0), + BIT(7) | BIT(6), BIT(7)); + /* use Audio infoframe updated info */ + regmap_update_bits(adv->regmap, ADV7511_REG_GC(1), + BIT(5), 0); + regmap_register_patch(adv->regmap_cec, adv7533_cec_fixed_registers, ARRAY_SIZE(adv7533_cec_fixed_registers)); }