From: Samuel Holland <samuel@sholland.org>
To: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@ucw.cz>,
linux-leds@vger.kernel.org, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Samuel Holland <samuel@sholland.org>,
Andre Przywara <andre.przywara@arm.com>,
Conor Dooley <conor+dt@kernel.org>,
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Guo Ren <guoren@kernel.org>, Jisheng Zhang <jszhang@kernel.org>,
John Watts <contact@jookia.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Maksim Kiselev <bigunclemax@gmail.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Palmer Dabbelt <palmer@dabbelt.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Rob Herring <robh+dt@kernel.org>,
Trevor Woerner <twoerner@gmail.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-sunxi@lists.linux.dev
Subject: [PATCH v8 0/5] leds: Allwinner A100 LED controller support
Date: Sun, 29 Oct 2023 16:26:54 -0500 [thread overview]
Message-ID: <20231029212738.7871-1-samuel@sholland.org> (raw)
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.
This series was tested on the Nezha board (one onboard LED) and the
Dongshan Nezha STU board (with an external strip of 16/32/48 LEDs, also
with gaps in the LED addresses).
Changes in v8:
- Remove redundant "Bindings" from the binding document title
- Make the DMA channel optional; the driver now works without DMA
- Fix spelling in the Kconfig description
- Fix the file header comment style
- Wrap to 100 columns instead of 80
- Use GENMASK for register bit fields
- Use FIELD_PREP for setting all multiple-bit register fields
- Add and use the LEDC_CHANNELS_PER_LED macro
- Make length and offset variables unsigned to avoid mixed signedness
- Add __counted_by for sun50i_a100_ledc::leds
- Move the new/existing xfer logic out of sun50i_a100_ledc_pio_xfer()
- Get the FIFO usage from INT_STS instead of assuming it is half full
- Make the DMA channel optional; always use PIO if it is unavailable
- Set up DMA before triggering the LEDC transfer to avoid underrun
- Correctly enable/disable the DRQ for each transfer
- Use more descriptive names for variables containing register values
- Add blank lines and comments to improve readability
- Add a comment explaining the write to the status register
- Remove unnecessary debugging prints
- Use the more-idiomatic post-increment operator in for loops
- Allow gaps in child node 'reg' values (separate max_addr/num_leds)
- Use device-managed allocation for the DMA buffer
- Unregister LEDs before shutting down the controller to correctly
respect LED_RETAIN_AT_SHUTDOWN (or lack thereof)
- Use the .remove_new platform driver hook
- Collected tags, except Tested-by for the driver due to large changes
Changes in v7:
- Use DEFINE_SIMPLE_DEV_PM_OPS
Changes in v6:
- Drop the A100 DMA controller DT node patch, which was merged via a
different series
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
.../leds/allwinner,sun50i-a100-ledc.yaml | 137 +++++
.../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 14 +
.../allwinner/sun20i-d1-lichee-rv-dock.dts | 12 +
.../boot/dts/allwinner/sun20i-d1-nezha.dts | 13 +
arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi | 6 +
.../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 15 +
drivers/leds/Kconfig | 9 +
drivers/leds/Makefile | 1 +
drivers/leds/leds-sun50i-a100.c | 580 ++++++++++++++++++
9 files changed, 787 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml
create mode 100644 drivers/leds/leds-sun50i-a100.c
--
2.41.0
WARNING: multiple messages have this Message-ID (diff)
From: Samuel Holland <samuel@sholland.org>
To: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@ucw.cz>,
linux-leds@vger.kernel.org, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
devicetree@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Samuel Holland <samuel@sholland.org>,
Andre Przywara <andre.przywara@arm.com>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
linux-sunxi@lists.linux.dev, John Watts <contact@jookia.org>,
Guo Ren <guoren@kernel.org>, Jisheng Zhang <jszhang@kernel.org>,
Maksim Kiselev <bigunclemax@gmail.com>,
linux-riscv@lists.infradead.org,
Marc Kleine-Budde <mkl@pengutronix.de>,
Palmer Dabbelt <palmer@dabbelt.com>,
linux-arm-kernel@lists.infradead.org,
Trevor Woerner <twoerner@gmail.com>
Subject: [PATCH v8 0/5] leds: Allwinner A100 LED controller support
Date: Sun, 29 Oct 2023 16:26:54 -0500 [thread overview]
Message-ID: <20231029212738.7871-1-samuel@sholland.org> (raw)
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.
This series was tested on the Nezha board (one onboard LED) and the
Dongshan Nezha STU board (with an external strip of 16/32/48 LEDs, also
with gaps in the LED addresses).
Changes in v8:
- Remove redundant "Bindings" from the binding document title
- Make the DMA channel optional; the driver now works without DMA
- Fix spelling in the Kconfig description
- Fix the file header comment style
- Wrap to 100 columns instead of 80
- Use GENMASK for register bit fields
- Use FIELD_PREP for setting all multiple-bit register fields
- Add and use the LEDC_CHANNELS_PER_LED macro
- Make length and offset variables unsigned to avoid mixed signedness
- Add __counted_by for sun50i_a100_ledc::leds
- Move the new/existing xfer logic out of sun50i_a100_ledc_pio_xfer()
- Get the FIFO usage from INT_STS instead of assuming it is half full
- Make the DMA channel optional; always use PIO if it is unavailable
- Set up DMA before triggering the LEDC transfer to avoid underrun
- Correctly enable/disable the DRQ for each transfer
- Use more descriptive names for variables containing register values
- Add blank lines and comments to improve readability
- Add a comment explaining the write to the status register
- Remove unnecessary debugging prints
- Use the more-idiomatic post-increment operator in for loops
- Allow gaps in child node 'reg' values (separate max_addr/num_leds)
- Use device-managed allocation for the DMA buffer
- Unregister LEDs before shutting down the controller to correctly
respect LED_RETAIN_AT_SHUTDOWN (or lack thereof)
- Use the .remove_new platform driver hook
- Collected tags, except Tested-by for the driver due to large changes
Changes in v7:
- Use DEFINE_SIMPLE_DEV_PM_OPS
Changes in v6:
- Drop the A100 DMA controller DT node patch, which was merged via a
different series
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
.../leds/allwinner,sun50i-a100-ledc.yaml | 137 +++++
.../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 14 +
.../allwinner/sun20i-d1-lichee-rv-dock.dts | 12 +
.../boot/dts/allwinner/sun20i-d1-nezha.dts | 13 +
arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi | 6 +
.../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 15 +
drivers/leds/Kconfig | 9 +
drivers/leds/Makefile | 1 +
drivers/leds/leds-sun50i-a100.c | 580 ++++++++++++++++++
9 files changed, 787 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml
create mode 100644 drivers/leds/leds-sun50i-a100.c
--
2.41.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Samuel Holland <samuel@sholland.org>
To: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@ucw.cz>,
linux-leds@vger.kernel.org, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Samuel Holland <samuel@sholland.org>,
Andre Przywara <andre.przywara@arm.com>,
Conor Dooley <conor+dt@kernel.org>,
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Guo Ren <guoren@kernel.org>, Jisheng Zhang <jszhang@kernel.org>,
John Watts <contact@jookia.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Maksim Kiselev <bigunclemax@gmail.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Palmer Dabbelt <palmer@dabbelt.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Rob Herring <robh+dt@kernel.org>,
Trevor Woerner <twoerner@gmail.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-sunxi@lists.linux.dev
Subject: [PATCH v8 0/5] leds: Allwinner A100 LED controller support
Date: Sun, 29 Oct 2023 16:26:54 -0500 [thread overview]
Message-ID: <20231029212738.7871-1-samuel@sholland.org> (raw)
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.
This series was tested on the Nezha board (one onboard LED) and the
Dongshan Nezha STU board (with an external strip of 16/32/48 LEDs, also
with gaps in the LED addresses).
Changes in v8:
- Remove redundant "Bindings" from the binding document title
- Make the DMA channel optional; the driver now works without DMA
- Fix spelling in the Kconfig description
- Fix the file header comment style
- Wrap to 100 columns instead of 80
- Use GENMASK for register bit fields
- Use FIELD_PREP for setting all multiple-bit register fields
- Add and use the LEDC_CHANNELS_PER_LED macro
- Make length and offset variables unsigned to avoid mixed signedness
- Add __counted_by for sun50i_a100_ledc::leds
- Move the new/existing xfer logic out of sun50i_a100_ledc_pio_xfer()
- Get the FIFO usage from INT_STS instead of assuming it is half full
- Make the DMA channel optional; always use PIO if it is unavailable
- Set up DMA before triggering the LEDC transfer to avoid underrun
- Correctly enable/disable the DRQ for each transfer
- Use more descriptive names for variables containing register values
- Add blank lines and comments to improve readability
- Add a comment explaining the write to the status register
- Remove unnecessary debugging prints
- Use the more-idiomatic post-increment operator in for loops
- Allow gaps in child node 'reg' values (separate max_addr/num_leds)
- Use device-managed allocation for the DMA buffer
- Unregister LEDs before shutting down the controller to correctly
respect LED_RETAIN_AT_SHUTDOWN (or lack thereof)
- Use the .remove_new platform driver hook
- Collected tags, except Tested-by for the driver due to large changes
Changes in v7:
- Use DEFINE_SIMPLE_DEV_PM_OPS
Changes in v6:
- Drop the A100 DMA controller DT node patch, which was merged via a
different series
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
.../leds/allwinner,sun50i-a100-ledc.yaml | 137 +++++
.../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 14 +
.../allwinner/sun20i-d1-lichee-rv-dock.dts | 12 +
.../boot/dts/allwinner/sun20i-d1-nezha.dts | 13 +
arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi | 6 +
.../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 15 +
drivers/leds/Kconfig | 9 +
drivers/leds/Makefile | 1 +
drivers/leds/leds-sun50i-a100.c | 580 ++++++++++++++++++
9 files changed, 787 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/allwinner,sun50i-a100-ledc.yaml
create mode 100644 drivers/leds/leds-sun50i-a100.c
--
2.41.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-10-29 21:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-29 21:26 Samuel Holland [this message]
2023-10-29 21:26 ` [PATCH v8 0/5] leds: Allwinner A100 LED controller support Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` [PATCH v8 1/5] dt-bindings: leds: Add Allwinner A100 LED controller Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` [PATCH v8 2/5] leds: sun50i-a100: New driver for the " Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` [PATCH v8 3/5] arm64: dts: allwinner: a100: Add LED controller node Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` [PATCH v8 4/5] riscv: dts: allwinner: d1: " Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` [PATCH v8 5/5] riscv: dts: allwinner: d1: Add RGB LEDs to boards Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-10-29 21:26 ` Samuel Holland
2023-11-23 10:55 ` (subset) [PATCH v8 0/5] leds: Allwinner A100 LED controller support Lee Jones
2023-11-23 10:55 ` Lee Jones
2023-11-23 10:55 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231029212738.7871-1-samuel@sholland.org \
--to=samuel@sholland.org \
--cc=andre.przywara@arm.com \
--cc=bigunclemax@gmail.com \
--cc=conor+dt@kernel.org \
--cc=contact@jookia.org \
--cc=cristian.ciocaltea@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=guoren@kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=jszhang@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mkl@pengutronix.de \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=twoerner@gmail.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.