From patchwork Tue Aug 23 05:50:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 9295609 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 3ADD1607D0 for ; Tue, 23 Aug 2016 12:32:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C5B62877C for ; Tue, 23 Aug 2016 12:32:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 212C928792; Tue, 23 Aug 2016 12:32:06 +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 374172877C for ; Tue, 23 Aug 2016 12:32:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF16F6E86A; Tue, 23 Aug 2016 12:29:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD4556E26A for ; Tue, 23 Aug 2016 05:50:55 +0000 (UTC) Received: by mail-pa0-x235.google.com with SMTP id ti13so44815988pac.0 for ; Mon, 22 Aug 2016 22:50:55 -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=Wy4cQND9yzs8b9osa/i8CS/oi+zzkpD+9MGGOL5nghWAceP9iHptKrIEqxdyBnw3Z7 /Oieu+YGecJWJRrJZ+RcWi0tijj1XeVbiIeqhpPvCMgLRp7WFLvLwk6F23pchyNo5wi6 pvzJh7Mg/80wGu1l1PzOJGQgsofpjvRF6p/k8= 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=HOtIXZsbPRdyEJOrfEBrEWbtj3/CigbdeM4eUva/k5T6PbnszpGUfeZQG7P1LpCPcg TCsQWlbW2Zm5cAWPk+MgNw+A3ktzwiW2Bf2YjXVC5gXtwUeAgAXO6Gnz1P1llT9chsKN 4i2JeJD5ekalBtO8JnKQ1T0ueT+B1TjTpOA3R89nzw/oaYng01+uujQLM02VsNuX8N8h lT2V0Cfza7AM3ignOR6tmbuvw6VrbJX2HSFFaQAU+i7EAQZnOpdJ6igBZkBWai3s51UM F0yIYY8qAHEM8SG/Qe4k/EzWGhCF9BUt6S6ETXrENqnYsEODF5gMHnGBE50j4kPDQx0g 8tdQ== X-Gm-Message-State: AEkoouvpx3IL5Cv9DvubClds0/G1mQJHvUCsKBi2uAAHaDaFMjCZDwk+qh+1l3FBXCJWWzs3 X-Received: by 10.66.159.170 with SMTP id xd10mr50353620pab.41.1471931455371; Mon, 22 Aug 2016 22:50:55 -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 wp4sm1937967pab.15.2016.08.22.22.50.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Aug 2016 22:50:54 -0700 (PDT) From: John Stultz To: lkml Subject: [RFC][PATCH 4/4] drm/bridge: adv7511: Initialize audio packet on adv7533 Date: Mon, 22 Aug 2016 22:50:47 -0700 Message-Id: <1471931447-12049-5-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1471931447-12049-1-git-send-email-john.stultz@linaro.org> References: <1471931447-12049-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)); }