From patchwork Sat Oct 13 16:53:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 983578 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="B4ATkh5j"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42XW5K5K6rz9sBj for ; Sun, 14 Oct 2018 03:54:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726129AbeJNAcU (ORCPT ); Sat, 13 Oct 2018 20:32:20 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:41487 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbeJNAcU (ORCPT ); Sat, 13 Oct 2018 20:32:20 -0400 Received: by mail-pf1-f193.google.com with SMTP id m77-v6so7675146pfi.8 for ; Sat, 13 Oct 2018 09:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pifzLIipcdyIInaO8ojFXkFZzUMo9UoQQkGDAXUujEo=; b=B4ATkh5jR2VHOZo3XBSFZBTH3QkhsVYfkhHiz0uXvznDbdx0BFEPgoH111YOEp0CwF Fdv67Td8sFroY4GdItkQXQP2YXpdSbssLEy+ZjEnefDD8ocFW1Aq6sBSSGIJuc7UfBfC 4IogUrfPnugfk1C8unmrUzloZ1lBuqL9cvJmUDod1nPX8LVne8Dz0kKMmDKW85ZALYqQ lWM6os4mVui/X5YltvE4dQH3D0oHvShYG+5i9s/z1dvBZmnSwhU0TToSmZLrrSpasI9c agcI9XIzfQADli+3d1levrD7FeyjGnz5B4i1hv/G1+PGicFnA7lkM30Pr+K5TErZ39MT 3U7A== 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=pifzLIipcdyIInaO8ojFXkFZzUMo9UoQQkGDAXUujEo=; b=DhZYHGPnCRhimkr/CZNA3aH4ERlcdzH6X8lcJLx7pWTJI+Ifa6qVp5q2OfbiKbCga2 0tvpTl3tShmsMjoh21ro6oQpJzM/zpnDsC4YpNbgaDLtOaBcmVnvkuwVhnAWAMhJS11R OYCtkr/6X92HmgxEuPxFK9lGPbi/3sB65sxfcFpyzqIWZWFyP8Zy280IFEBoY9Ok1rxY QzgtaLqCZifhMsSk62CU5LhjgajC6F+cjZ7qHNJPmU3ozUsbsAhm7mqIfug8LmxKM2Io rMJrUvA/Vl5j5gSRjYc/+uMo0dKdMhH2MRCS6V7Q+btQIuIcrI3byQ/XyPkinjtMvYfg Nj6A== X-Gm-Message-State: ABuFfojrqvCbNN46HUbbTS9cnXwql5sHwrXI3MMgYPG1U5kXei+HD70/ XprDmozdgeuhS1kQehmG8UCLSeRFzbUzeA== X-Google-Smtp-Source: ACcGV60+JoDsbtv+ZE9GgjVS6oW/ZdnfYSKswMBmtsf56CJfjJSM87PKHC6w8DwpBnZh8BXwfX8Byg== X-Received: by 2002:a65:4882:: with SMTP id n2-v6mr9423318pgs.225.1539449666301; Sat, 13 Oct 2018 09:54:26 -0700 (PDT) Received: from anarsoul-thinkpad.lan (216-71-193-140.dyn.novuscom.net. [216.71.193.140]) by smtp.gmail.com with ESMTPSA id n82-v6sm8727514pfg.21.2018.10.13.09.54.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 09:54:25 -0700 (PDT) From: Vasily Khoruzhick To: Liam Girdwood , Mark Brown , Rob Herring , Mark Rutland , Maxime Ripard , Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Mylene JOSSERAND , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Cc: Vasily Khoruzhick Subject: [PATCH v2 0/9] Add support for audiocodec in Allwinner A64 Date: Sat, 13 Oct 2018 09:53:20 -0700 Message-Id: <20181013165329.13363-1-anarsoul@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This series adds Allwinner A64 audiocodec support into sun4i-i2s, sun8i-codec drivers, introduces new sun50i-codec-analog driver and enables sound on Pine64, SoPine boards and Pinebook. I2S for audiocodec in A64 is different from other 3 I2S modules but similar to one in A10, digital part of codec is compatible with A33 and analog controls part is completely different from other SoCs - it shares only few bits in few registers, so adding support for it into existing sun8i-codec-analog would mean duplicating all the widgets, controls and some routes and making it hard to read. Therefore it makes sense to introduce new driver. v2: - Use simple-amplifier for speaker amp on Pinebook - Rename sun50i-a64-i2s to sun50i-a64-codec-i2s to preserve compatible string for other 3 I2S modules in A64 in case if there's any incompatibility with H3 Marcus Cooper (1): ASoC: sun4i-i2s: Add compatibility with A64 codec I2S Vasily Khoruzhick (8): ASoC: sun8i-codec: Don't hardcode BCLK / LRCK ratio ASoC: sun8i-codec-analog: split regmap code into separate driver ASoC: dt-binding: Add bindings for Allwinner A64 codec's analog path controls ASoC: sunxi: Add new driver for Allwinner A64 codec's analog path controls ASoC: sunxi: allow the sun8i-codec driver to be built on ARM64 arm64: dts: allwinner: a64: add nodes necessary for analog sound support arm64: dts: allwinner: a64: enable sound on Pine64 and SoPine arm64: dts: allwinner: a64: enable sound on Pinebook .../devicetree/bindings/sound/sun4i-i2s.txt | 2 + .../bindings/sound/sun50i-codec-analog.txt | 12 + .../boot/dts/allwinner/sun50i-a64-pine64.dts | 30 ++ .../dts/allwinner/sun50i-a64-pinebook.dts | 42 ++ .../allwinner/sun50i-a64-sopine-baseboard.dts | 30 ++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 58 +++ sound/soc/sunxi/Kconfig | 17 +- sound/soc/sunxi/Makefile | 2 + sound/soc/sunxi/sun4i-i2s.c | 21 + sound/soc/sunxi/sun50i-codec-analog.c | 444 ++++++++++++++++++ sound/soc/sunxi/sun8i-codec-analog.c | 79 +--- sound/soc/sunxi/sun8i-codec.c | 35 +- sound/soc/sunxi/sunxi-adda-pr-regmap.c | 102 ++++ sound/soc/sunxi/sunxi-adda-pr-regmap.h | 7 + 14 files changed, 798 insertions(+), 83 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sun50i-codec-analog.txt create mode 100644 sound/soc/sunxi/sun50i-codec-analog.c create mode 100644 sound/soc/sunxi/sunxi-adda-pr-regmap.c create mode 100644 sound/soc/sunxi/sunxi-adda-pr-regmap.h Acked-by: Maxime Ripard Acked-by: Maxime Ripard Acked-by: Maxime Ripard