Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1961rwe; Thu, 25 Aug 2022 22:30:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Gbq5zC2235Vtgb0bbkS/banlA9/pH/TT2bpOnVZYBbHAnvuVJ988S3cG5o1cm6jJ4Wk1+ X-Received: by 2002:a17:907:3f21:b0:73d:87da:dc6a with SMTP id hq33-20020a1709073f2100b0073d87dadc6amr4414667ejc.658.1661491835286; Thu, 25 Aug 2022 22:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661491835; cv=none; d=google.com; s=arc-20160816; b=DX2zZmmxXYh6/NQDM7orDDUAKBsM0t7U9s1kNlSkP0ApA22RGxBoU63odufX/UOJYc ITJwS9D+JeMbQNI03K6+PJrmrp8fLqAsuolwKroJLBgoNcfA/RNdqVhTf6pBp/z1L5zd gItYVKkDTbs7VEULjWip0jclgHAPnFprsEOlOdEpEUMmk/YHPS+6xTftoeR7VfPz5jEP UwYmGSmuAmbsSlQx/BudKmDC9z9AxOxFMWI+HImmsY2jhaQeaXK40LzDP8YCnByGMrgc 8/ijb1qYylkIsDvA5M7dk4jWgM+k4QNhPZM1Gfx3TXlQBj1TR9Hli0hAAvRh2vi0YTlu G8QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=NEvgS4Y1TGOoJYMfZcyVI7VSqu0kF4KmZH4aP8oll78=; b=mCW9Dmf83wvwBYDQCUoyr0BBZYoRyZatWb3JAzOZxuLSxKwD3R8jg1K4urFk0sqGdk EyrVF3fbUKe3IjlBZSw4HRbcVlR6c85nttn9p++fM/q7dUoFu8MucaXIbTLvoSC+JaVy 1OEv8hWzYctL6KziwfI4wVna5X5yb/km/p3x0GJhKdvqNd+/x230ygEV3wQBIp6juU1J gsejS7zNK65hNRBNfaSu7qZwLrsJZIk2jA3qPgnqpAQGRz8q8AKe4Nr+ZlEWEC+8sFAe Z8tJBwu7qpeAao9VghBSJMQ49WO701w9AtzIualYMZSBQqB1EEFyHru12cfLLezwvodp fXZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=f8802ZT0; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=YNSmRSML; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a05640250c600b0044347b22b2bsi957784edb.354.2022.08.25.22.30.08; Thu, 25 Aug 2022 22:30:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=f8802ZT0; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=YNSmRSML; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234316AbiHZFJ6 (ORCPT + 99 others); Fri, 26 Aug 2022 01:09:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbiHZFJv (ORCPT ); Fri, 26 Aug 2022 01:09:51 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F67960CE; Thu, 25 Aug 2022 22:09:49 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 208683200A8A; Fri, 26 Aug 2022 01:09:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 26 Aug 2022 01:09:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1661490584; x=1661576984; bh=NEvgS4Y1TGOoJYMfZcyVI7VSq u0kF4KmZH4aP8oll78=; b=f8802ZT0NXEE+nsRnbik4K9cWZcHki4hnSdjJZfGn PBgM6nwfWv691zRaAK77mn+43zu0xFXjMGA0i3QLNI3hpTnweYHI0Kw4LmqWLZfC QUgZBj80ayu+BYuBKHbbz1em3Yj+qNSeTIb8XcLfQ0qcoUGAn3timDgkhC6OpMXI OYBSh47xGcrHvLt06VsQILSSNKkRNuqMlB2/iRZdPmka+6LYrqlx3u1bFJE1nNFZ +bxcvtcXdl2sBqgR/LU0d5RAiBSquFv4mUhWh34CETvoJRNPNCqSw23rOj4DM70h iU4Zro3OgouG3TE6fLRRwmBsixTWucDiE9o6YYzVhbZLg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1661490584; x=1661576984; bh=NEvgS4Y1TGOoJYMfZcyVI7VSqu0kF4KmZH4 aP8oll78=; b=YNSmRSML2ldp/e9zXzgdBhzVPrRhlFXUacx2mCIlkJAreIK24FV hS9ey9XNCPCMjJC5aYYH8DvK66X2S7p8g2iID9nS0fJ6ChkEIylObpCwlYSiWgsd TKtD4D3M0K2enCV19wFxQHgghdj7PAOi3VP55RfZfBTCRzIQXCfI6c0sjbuTNa0X BvJuPQOxtk8s11tYWyQCs/Bwkd7EtNBloFPatWNNLlMx27pi70TB8sZ3K74fDy0D rEGoQ7MmM5MOnebfjSSGjYFmPRTOetk8S+HTTtggi+OUQtgq1spszhCnGz8pOX/O 1a1LcAj4f3nXBlH4R0Jv52wp3S7UqhemBsw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejgedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepkeehffethedtteffgfefteetjedvfeelueevudffgfeutdejvdehledv vdffhfevnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgrnhgu rdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 26 Aug 2022 01:09:43 -0400 (EDT) From: Samuel Holland To: Pavel Machek , Chen-Yu Tsai , Jernej Skrabec , linux-leds@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, Rob Herring , Samuel Holland Subject: [PATCH v5 0/6] leds: Allwinner A100 LED controller support Date: Fri, 26 Aug 2022 00:09:36 -0500 Message-Id: <20220826050942.20067-1-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds bindings and a driver for the RGB LED controller found in some Allwinner SoCs, starting with A100. The hardware in the R329 and D1 SoCs appears to be identical. Patch 3 is included because the LED controller binding requires the DMA properties. That patch was sent previously[1], but never got merged. Patches 5-6 depend on the D1 devicetree series[2], but the rest of this series can be merged without them. This driver was tested on the D1 Nezha board. [1]: https://lore.kernel.org/linux-arm-kernel/20201110040553.1381-7-frank@allwinnertech.com/ [2]: https://lore.kernel.org/linux-riscv/20220815050815.22340-1-samuel@sholland.org/ Changes in v5: - A100 contains the original implementation, so use that as the base compatible string, and rename the binding to match - Add "unevaluatedProperties: false" to the child multi-led binding - Rename the driver R329 -> A100, since that is the actual original implementation Changes in v4: - Use "default" instead of "maxItems" for timing properties - Depend on LEDS_CLASS_MULTICOLOR Changes in v3: - Removed quotes from enumeration values - Added vendor prefix to timing/format properties - Renamed "format" property to "pixel-format" for clarity - Dropped "vled-supply" as it is unrelated to the controller hardware - Added vendor prefix to timing/format properties - Renamed "format" property to "pixel-format" for clarity - Dropped "vled-supply" as it is unrelated to the controller hardware - Changed "writesl" to "iowrite32_rep" so the driver builds on hppa Changes in v2: - Fixed typo leading to duplicate t1h-ns property - Removed "items" layer in definition of dmas/dma-names - Replaced uint32 type reference with maxItems in timing properties - Renamed from sunxi-ledc to sun50i-r329-ledc - Added missing "static" to functions/globals as reported by 0day bot Samuel Holland (5): dt-bindings: leds: Add Allwinner A100 LED controller leds: sun50i-a100: New driver for the A100 LED controller arm64: dts: allwinner: a100: Add LED controller node riscv: dts: allwinner: d1: Add LED controller node riscv: dts: allwinner: d1: Add RGB LEDs to boards Yangtao Li (1): arm64: dts: allwinner: a100: Add device node for DMA controller .../leds/allwinner,sun50i-a100-ledc.yaml | 139 +++++ .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 26 + .../allwinner/sun20i-d1-lichee-rv-dock.dts | 12 + .../boot/dts/allwinner/sun20i-d1-nezha.dts | 13 + arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi | 21 + drivers/leds/Kconfig | 9 + drivers/leds/Makefile | 1 + drivers/leds/leds-sun50i-a100.c | 554 ++++++++++++++++++ 8 files changed, 775 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml create mode 100644 drivers/leds/leds-sun50i-a100.c -- 2.35.1