All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] ARM: dts: suniv: F1C100s: add more peripherals
@ 2022-11-01 14:16 ` Andre Przywara
  0 siblings, 0 replies; 50+ messages in thread
From: Andre Przywara @ 2022-11-01 14:16 UTC (permalink / raw)
  To: Jernej Skrabec, Samuel Holland, Chen-Yu Tsai, Rob Herring,
	Krzysztof Kozlowski
  Cc: devicetree, linux-sunxi, linux-arm-kernel, Icenowy Zheng

The Allwinner F1C100s series of SoCs shares many peripherals with other
Allwinner SoCs. Since they are compatible, we can use the existing
drivers, and just need to enable the devices in the DT.

This series adds the I2C controllers, the PWM device, the CIR (infrared)
device and the LRADC (aka. KEYADC, low res ADC) to the F1C100s .dtsi, so
boards can just use them by setting 'status = "okay";'.

The only thing missing driver-wise is the IR mod clock, which was not
modeled in our CCU driver. Patch 5/9 fixes that.

For every device there is one patch that adds the new compatible string
to the DT binding, and another patch to add the DT node.

This has been tested with a Lctech Pi F1C200s board, by:
- Connecting an LED to PE6, and configuring this as the PWM pin in the DT.
  Doing a sweep on /sys/class/pwm/pwm1/duty_cycle made the LED fade out.
- Configuring PD0/PD12 as I2C0, and letting i2c-detect find the on-board
  NS2009 I2C chip.
- Connecting two resistors to the "ADC" pin, and configuring them as two
  buttons in the DT. /dev/input/event0 properly reported button presses.
- Connecting an infrared receiver to PE11, configured as CIR.
  ir-keytable reported key presses on a remote control.

All those (basic) tests were successful, and prove that the peripherals
do work and are compatible.

Please have a look and test on your hardware, if possible.

Cheers,
Andre

Andre Przywara (9):
  dt-bindings: pwm: allwinner,sun4i-a10: Add F1C100s compatible
  ARM: dts: suniv: f1c100s: add PWM node
  dt-bindings: i2c: mv64xxx: Add F1C100s compatible string
  ARM: dts: suniv: f1c100s: add I2C DT nodes
  clk: sunxi-ng: f1c100s: Add IR mod clock
  dt-bindings: media: IR: Add F1C100s IR compatible string
  ARM: dts: suniv: f1c100s: add CIR DT node
  dt-bindings: input: sun4i-lradc-keys: Add F1C100s compatible
  ARM: dts: suniv: f1c100s: add LRADC node

 .../bindings/i2c/marvell,mv64xxx-i2c.yaml     |  1 +
 .../input/allwinner,sun4i-a10-lradc-keys.yaml |  4 +-
 .../media/allwinner,sun4i-a10-ir.yaml         |  1 +
 .../bindings/pwm/allwinner,sun4i-a10-pwm.yaml |  4 +-
 arch/arm/boot/dts/suniv-f1c100s.dtsi          | 78 +++++++++++++++++++
 drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c      | 11 ++-
 drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h      |  2 +-
 include/dt-bindings/clock/suniv-ccu-f1c100s.h |  2 +
 8 files changed, 99 insertions(+), 4 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2022-11-17 13:44 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 14:16 [PATCH 0/9] ARM: dts: suniv: F1C100s: add more peripherals Andre Przywara
2022-11-01 14:16 ` Andre Przywara
2022-11-01 14:16 ` [PATCH 1/9] dt-bindings: pwm: allwinner,sun4i-a10: Add F1C100s compatible Andre Przywara
2022-11-01 14:16   ` Andre Przywara
2022-11-02 17:28   ` Rob Herring
2022-11-02 17:28     ` Rob Herring
2022-11-17 12:05   ` Uwe Kleine-König
2022-11-17 12:05     ` Uwe Kleine-König
2022-11-01 14:16 ` [PATCH 2/9] ARM: dts: suniv: f1c100s: add PWM node Andre Przywara
2022-11-01 14:16   ` Andre Przywara
2022-11-06  7:56   ` Jernej Škrabec
2022-11-06  7:56     ` Jernej Škrabec
2022-11-17 12:03   ` Uwe Kleine-König
2022-11-17 12:03     ` Uwe Kleine-König
2022-11-17 13:43     ` Andre Przywara
2022-11-17 13:43       ` Andre Przywara
2022-11-01 14:16 ` [PATCH 3/9] dt-bindings: i2c: mv64xxx: Add F1C100s compatible string Andre Przywara
2022-11-01 14:16   ` Andre Przywara
2022-11-02 17:28   ` Rob Herring
2022-11-02 17:28     ` Rob Herring
2022-11-02 20:19   ` Wolfram Sang
2022-11-02 20:19     ` Wolfram Sang
2022-11-01 14:16 ` [PATCH 4/9] ARM: dts: suniv: f1c100s: add I2C DT nodes Andre Przywara
2022-11-01 14:16   ` Andre Przywara
2022-11-06  8:09   ` Jernej Škrabec
2022-11-06  8:09     ` Jernej Škrabec
2022-11-06 23:12     ` Andre Przywara
2022-11-06 23:12       ` Andre Przywara
2022-11-01 14:16 ` [PATCH 5/9] clk: sunxi-ng: f1c100s: Add IR mod clock Andre Przywara
2022-11-01 14:16   ` Andre Przywara
2022-11-06  8:22   ` Jernej Škrabec
2022-11-06  8:22     ` Jernej Škrabec
2022-11-01 14:16 ` [PATCH 6/9] dt-bindings: media: IR: Add F1C100s IR compatible string Andre Przywara
2022-11-01 14:16   ` Andre Przywara
2022-11-02 17:28   ` Rob Herring
2022-11-02 17:28     ` Rob Herring
2022-11-01 14:16 ` [PATCH 7/9] ARM: dts: suniv: f1c100s: add CIR DT node Andre Przywara
2022-11-01 14:16   ` Andre Przywara
2022-11-06  8:23   ` Jernej Škrabec
2022-11-06  8:23     ` Jernej Škrabec
2022-11-01 14:16 ` [PATCH 8/9] dt-bindings: input: sun4i-lradc-keys: Add F1C100s compatible Andre Przywara
2022-11-01 14:16   ` Andre Przywara
2022-11-02 17:28   ` Rob Herring
2022-11-02 17:28     ` Rob Herring
2022-11-03 20:45   ` Dmitry Torokhov
2022-11-03 20:45     ` Dmitry Torokhov
2022-11-01 14:16 ` [PATCH 9/9] ARM: dts: suniv: f1c100s: add LRADC node Andre Przywara
2022-11-01 14:16   ` Andre Przywara
2022-11-06  8:25   ` Jernej Škrabec
2022-11-06  8:25     ` Jernej Škrabec

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.