The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Sven Peter" <sven@svenpeter.dev>
To: "Rob Herring" <robh@kernel.org>
Cc: "Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	"Janne Grunau" <j@jannau.net>,
	"Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
	"Neal Gompa" <neal@gompa.dev>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-kernel@vger.kernel.org, asahi@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	R <rqou@berkeley.edu>
Subject: Re: [PATCH 0/7] Support exposing bits of any byte as NVMEM cells
Date: Wed, 14 May 2025 22:38:34 +0200	[thread overview]
Message-ID: <b336221b-e1fa-42d8-a879-bda178f73735@app.fastmail.com> (raw)
In-Reply-To: <20250514203246.GA2958656-robh@kernel.org>

Hi,

On Wed, May 14, 2025, at 22:32, Rob Herring wrote:
> On Sat, May 10, 2025 at 07:44:40AM +0000, Sven Peter wrote:
>> Hi,
>> 
>> I'm preparing USB3 support for Apple Silicon Macs for upstreaming right
>> now and this series is the first dependency. The Type-C PHY requires
>> configuration values encoded in fuses for which we already have a
>> driver.
>> Unfortunately, the fuses on these machines are only accessibly as 32bit
>> words but the Type-C PHY configuration values are individual bits which
>> are sometimes spread across multiple fuses.
>> Right now this is not supported by the nvmem core which only allows a
>> subset of bits within the first byte to be exposed as a nvmem cell. This
>> small series adds support for exposing arbitrary bits as nvmem cells.
>> 
>> The second part of the series then adds the nvmem cells required for the
>> Type-C PHY to our device trees. While it's technically independent I've
>> included those changes in this series for context.
>
> The idea in the DT is normal addressing is byte-wise, so the only thing 
> needed to specify bit level addressing is a 1-7 bit offset.
>
> If you have access size restrictions, then that should be handled by 
> your driver. The nvmem layout shouldn't change because of that. You 
> could perhaps define the access size with 'reg-io-width' property, but 
> really compatible should imply it.

fair enough, I'll just handle the unaligned reads in the driver itself then
and adjust the offsets in the device tree.


Sven


      reply	other threads:[~2025-05-14 20:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-10  7:44 [PATCH 0/7] Support exposing bits of any byte as NVMEM cells Sven Peter via B4 Relay
2025-05-10  7:44 ` [PATCH 1/7] nvmem: core: allow bit offset > 8 Sven Peter via B4 Relay
2025-05-10  7:44 ` [PATCH 2/7] nvmem: core: round up to word_size Sven Peter via B4 Relay
2025-05-10  7:44 ` [PATCH 3/7] Revert "nvmem: core: Print error on wrong bits DT property" Sven Peter via B4 Relay
2025-05-10  7:44 ` [PATCH 4/7] dt-bindings: nvmem: apple: Add T8112 compatible Sven Peter via B4 Relay
2025-05-14 20:34   ` Rob Herring
2025-05-10  7:44 ` [PATCH 5/7] arm64: dts: apple: t8103: Add eFuses node Sven Peter via B4 Relay
2025-05-10  7:44 ` [PATCH 6/7] arm64: dts: apple: t600x: " Sven Peter via B4 Relay
2025-05-10  7:44 ` [PATCH 7/7] arm64: dts: apple: t8112: " Sven Peter via B4 Relay
2025-05-12 12:49 ` [PATCH 0/7] Support exposing bits of any byte as NVMEM cells Rob Herring (Arm)
2025-05-14 20:32 ` Rob Herring
2025-05-14 20:38   ` Sven Peter [this message]

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=b336221b-e1fa-42d8-a879-bda178f73735@app.fastmail.com \
    --to=sven@svenpeter.dev \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=j@jannau.net \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neal@gompa.dev \
    --cc=robh@kernel.org \
    --cc=rqou@berkeley.edu \
    --cc=srinivas.kandagatla@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox