mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Pisati <p.pisati@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Niklas Cassel <cassel@kernel.org>
Cc: linux-m68k@lists.linux-m68k.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
	mfd@lists.linux.dev
Subject: [PATCH v1 0/7] zorro: add a CS-Lab Warp 1260 MFD
Date: Wed, 11 Nov 2026 17:37:27 +0100	[thread overview]
Message-ID: <20261111163735.227286-1-p.pisati@gmail.com> (raw)

The CS-Lab Warp 1260 is an A1200 trapdoor multifunction accelerator: it
contains a 68060, an FPGA, an ARM co-processor and several sub-devices
hanging off them. The 68k drives the IDE interface and the RTG display
controller directly, through the FPGA; the ARM owns most of the rest -
USB, SD card, WiFi, audio, the Kickstart slots, the CPU clock, fan
control and the board telemetry - and the 68k reaches it through a
dual-port RAM mailbox.

pata_cswarp, merged in 7.4-rc1, binds the board's Zorro device for the
IDE window alone. This series puts an mfd parent on the device
instead, hands the IDE window to pata_cswarp as a cell, and uses the
mailbox for a first set of board functions, exposed as sysfs
attributes on the Zorro device:

  1-3  the mfd parent, pata_cswarp as its first cell, defconfig
  4    the dual-port RAM command channel and the board identity
  5-7  voltages and temperatures, fan duty cycle, Kickstart slot
       selection

The layout - an mfd parent in drivers/zorro/ handing cells to the
function drivers - is modelled on Geert's Zorro MFD experiments [1],
which were the inspiration for this series.

The RFC [2] got no replies, so its questions still stand:

- Geert, does this fit where you wanted to take the Zorro MFD work?
  Should the parent stay in drivers/zorro/, as in your experiments,
  or move to drivers/mfd/? Lee, I have Cc'd you for this one.
- Would you rather see the voltages, temperatures and fan in hwmon
  than as plain sysfs attributes?
- Writing kickslot makes the ARM reset the machine on the spot. Is a
  sysfs attribute acceptable for that?

Changes since the RFC:
- Rebased on v7.4-rc2, which has pata_cswarp and its defconfig patch.
- Dropped the WiFi configuration patch. The board commits the SSID and
  the passphrase together when the passphrase arrives, so writing the
  passphrase alone clears the SSID: two independent attributes cannot
  express that.
- Documented the attributes in
  Documentation/ABI/testing/sysfs-driver-warp-mfd and added a
  MAINTAINERS entry.
- Created the attributes through .driver.dev_groups.
- pata_cswarp: mapped the cell with devm_ioremap_resource().
- The store callback takes a size_t count, the driver includes what it
  uses, and the probe banner prints the board window with %pR.

Tested on a Warp 1260 (firmware 20.27) on top of v7.4-rc2. Every patch
builds warp-mfd and pata_cswarp with W=1 for m68k.

I wrote the original version of this driver myself, by hand. An LLM
coding assistant came in later: it was used to review that code
against CS-Lab's AmigaOS sources, to write several of the fixes folded
into these patches and the ABI documentation, to split the work into
this series and to draft the commit messages. I reviewed every change
and tested the result on my Warp 1260.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git/log/?h=zorro-mfd
[2] https://lore.kernel.org/r/20261021172910.134838-1-p.pisati@gmail.com

Paolo Pisati (7):
  zorro: warp mfd: add the CS-Lab Warp multifunction parent
  ata: pata_cswarp: bind to the Warp mfd cell instead of the Zorro
    device
  m68k: defconfig: enable WARP_MFD
  zorro: warp mfd: add the dual-port RAM command channel and expose the
    board identity
  zorro: warp mfd: expose the voltage and temperature sensors
  zorro: warp mfd: expose the fan duty cycle
  zorro: warp mfd: expose the Kickstart slot selection

 .../ABI/testing/sysfs-driver-warp-mfd         |  53 ++
 MAINTAINERS                                   |   8 +
 arch/m68k/configs/amiga_defconfig             |   1 +
 arch/m68k/configs/multi_defconfig             |   1 +
 drivers/ata/Kconfig                           |   2 +-
 drivers/ata/pata_cswarp.c                     |  48 +-
 drivers/zorro/Kconfig                         |  30 ++
 drivers/zorro/Makefile                        |   2 +
 drivers/zorro/warp-mfd.c                      | 473 ++++++++++++++++++
 drivers/zorro/warp-mfd.h                      | 148 ++++++
 10 files changed, 734 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-warp-mfd
 create mode 100644 drivers/zorro/warp-mfd.c
 create mode 100644 drivers/zorro/warp-mfd.h


base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
-- 
2.43.0


             reply	other threads:[~2026-11-11 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 16:37 Paolo Pisati [this message]
2026-11-11 16:37 ` [PATCH v1 1/7] zorro: warp mfd: add the CS-Lab Warp multifunction parent Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 2/7] ata: pata_cswarp: bind to the Warp mfd cell instead of the Zorro device Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 3/7] m68k: defconfig: enable WARP_MFD Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 4/7] zorro: warp mfd: add the dual-port RAM command channel and expose the board identity Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 5/7] zorro: warp mfd: expose the voltage and temperature sensors Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 6/7] zorro: warp mfd: expose the fan duty cycle Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 7/7] zorro: warp mfd: expose the Kickstart slot selection Paolo Pisati

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=20261111163735.227286-1-p.pisati@gmail.com \
    --to=p.pisati@gmail.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=lee@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=mfd@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®