From patchwork Mon Apr 8 12:18:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10889447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0F34B922 for ; Mon, 8 Apr 2019 12:18:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E04A728565 for ; Mon, 8 Apr 2019 12:18:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4DB4285A3; Mon, 8 Apr 2019 12:18:32 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 875DE28565 for ; Mon, 8 Apr 2019 12:18:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yQv+sW7c8Fr7jypZfw6FFQCvjjWONJVAlgJUEBTli8k=; b=rvE3gjfUFJE1et Io5Ed7ddG3InGHs2DWgUwGuIjebeIJ++KRS+mgihSKJoSyaw/VS06AM+bRWWVKWHx9NxepSAbv9ro RYDdiQK8Hr+S6Igny3q2YkCraJHX2HNpG58aUY0IRlwZpPc98t9s17Md3QJLBYj9T+MornWqHp/xt 0Tw64DGSFzV/tQ8huNKDG+wdohLjI2JetL+dgvJOZicj6o6a78agumvMFlJol64Kz8zKeQ2hQT/G1 WljfK7MsnwS/rEi1tK6Kn9N91VNRzHXNx3UmjuFQG7UtQcVy9rb381HyZSOlCBFIdM/5GfUvQR8op AoJFapydUC64RXQYBciQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDTEL-00008m-HK; Mon, 08 Apr 2019 12:18:29 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDTE1-0008HT-DZ for linux-arm-kernel@lists.infradead.org; Mon, 08 Apr 2019 12:18:11 +0000 Received: by mail-wm1-x341.google.com with SMTP id w15so14459760wmc.3 for ; Mon, 08 Apr 2019 05:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8UpAj9YfdUW4CMDRxIiHz7xX8khEqdof0qRT0yl1Om0=; b=o/rvHZTFAe0VdbSzgTiiC99n/h4CzCWZe0CTp2ayr1+YHssIea0MmB9jYzr5+9LWd9 0MO9ytqi0WMvFDguDixKX9s6xDFoDaZcSccQOeJvU+OX5PoNGreS4m1AwGJXXvtpICCZ Z4iGah8tY3Bp3XvTIj5qlSYcAnnAVn92FXwsvM4sZM7WE2nIcN2M2LPxQXeNL43SD34I sRoyIXDRK3k8hz/MKTYVr23UtPnn/4mxD+IsjvvqWLcYyYjOhf6CRlhfm+ZA3seLfOz8 8J5VkxEFMQl4GxN5P2GRwLjQPIgBIVWNW+X14qMWOE6o3StUViVfsU7Hf9vh4NEyn3vd ulKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8UpAj9YfdUW4CMDRxIiHz7xX8khEqdof0qRT0yl1Om0=; b=jnBdkYHSPQ8asaGLqxqoe167yVUWJDXcMQeBALrkLtKefHekJl+Fyspa/pFi7DeBki 5maaDgS0ru+G5p+pfAy38TKhT4MfuHW34ya9CC1adV+T6/XWWHc3bgQ3eqKNNJxHUE64 Q3uAIY3Id+VXPOvOhHw6qeQf/VJZOlPkWN0okvRsL04yVcrEU29rKHtDZStlj/DxF2Yb 3bH3JNv6s7Hn93fks10i8hu9f/wkQXIOqZwcZ0snfX789GMBNK68fITuQ7Ft0hjduvDt rUz4Lm6tnvOPL0wIobfkidyzrspeh4HGoK4T+NdLWr4pjyK/MNT1ntUPnHx2os/nCXDW hVvQ== X-Gm-Message-State: APjAAAXT55lTwmUUMrPlMb9oPj6wFSNxgjvqcsMMJN6xQCetOm87OKXC AimSO/GZYBi/Xqe7gNLmU+2/iQ== X-Google-Smtp-Source: APXvYqzLuoC3RfA2e2x0g4Fs95byB5EytlhVbbhVCctSoT7tKo/dTwrmxUbR2pSfQyOoo8Fat4opfg== X-Received: by 2002:a1c:9e96:: with SMTP id h144mr17941211wme.33.1554725887208; Mon, 08 Apr 2019 05:18:07 -0700 (PDT) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id e1sm52865103wrw.66.2019.04.08.05.18.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Apr 2019 05:18:06 -0700 (PDT) From: Neil Armstrong To: hverkuil@xs4all.nl, mchehab@kernel.org Subject: [PATCH v4 0/3] media: platform: Add support for the Amlogic Meson G12A AO CEC Controller Date: Mon, 8 Apr 2019 14:18:02 +0200 Message-Id: <20190408121805.2870-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190408_051809_465110_77B52C9C X-CRM114-Status: GOOD ( 13.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Amlogic G12A SoC embeds a second CEC controller with a totally different design. The two controller can work in the same time since the CEC line can be set to two different pins on the two controllers. This second CEC controller is documented as "AO-CEC-B", thus the registers will be named "CECB_" to differentiate with the other AO-CEC driver. Unlike the other AO-CEC controller, this one takes the Oscillator clock as input and embeds a dual-divider to provide a precise 32768Hz clock for communication. This is handled by registering a clock in the driver. Unlike the other AO-CEC controller, this controller supports setting up to 15 logical addresses and supports the signal_free_time settings in the transmit function. Unfortunately, this controller does not support "monitor" mode. This patchset : - Update the bindings for this controller - Add the controller driver - Update the MAINTAINERS entry Changes since v3: - Use the cec_notifier_find_hdmi_dev() introduced in [1] Changes since v2: - Really fixed compatible used in driver - Collected bindings review tag Changes since v1: - Fixed typos in bindings - Fixed compatible used in driver, using the bindings defined one - Fix regmap return value handling - Fix irq error handling - Fixed wrong clk unprepare on oscin [1] https://patchwork.linuxtv.org/patch/55513/ Neil Armstrong (3): media: dt-bindings: media: meson-ao-cec: Add G12A AO-CEC-B Compatible media: platform: meson: Add Amlogic Meson G12A AO CEC Controller driver MAINTAINERS: Update AO CEC with ao-cec-g12a driver .../bindings/media/meson-ao-cec.txt | 13 +- MAINTAINERS | 1 + drivers/media/platform/Kconfig | 13 + drivers/media/platform/meson/Makefile | 1 + drivers/media/platform/meson/ao-cec-g12a.c | 779 ++++++++++++++++++ 5 files changed, 804 insertions(+), 3 deletions(-) create mode 100644 drivers/media/platform/meson/ao-cec-g12a.c