[PATCH] nvmem: rockchip-otp: Handle internal word_size in main reg_read op

Willy Tarreau w at 1wt.eu
Mon Jul 28 12:06:37 PDT 2025


On Tue, Apr 22, 2025 at 11:37:06AM +0200, Heiko Stübner wrote:
> Am Sonntag, 16. März 2025, 20:18:58 Mitteleuropäische Sommerzeit schrieb Jonas Karlman:
> > Rockchip SoCs RK3576 and RK3588 read data from the OTP using 32-bit
> > words instead of normal 8-bit bytes. Similar RK3506, RK3528, RK3562 and
> > RK3568 will read data from OTP using 16-bit words.
> > 
> > The nvmem core stride and word_size cannot fully be used as cells is not
> > always aligned. Continue to report a stride=1 and word_size=1 in
> > nvmem_config and instead handle use of SoC specific word_size internally
> > in the driver.
> > 
> > Move current SoC specific word_size handling from the RK3588 read_reg
> > operation to the main read_reg operation to help simplify the SoC
> > specific read_reg operation and allow code reuse in a future RK3568
> > reg_read operation.
> > 
> > Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
> 
> Reviewed-by: Heiko Stuebner <heiko at sntech.de>
> 
> On both rk3576 and rk3588 compared nvmem content before and after
> the change, so
> 
> Tested-by: Heiko Stuebner <heiko at sntech.de>

My understanding is that it's part of the dependency chain needed to
get TSADC to work, and since I could get it to work on my E20C using
Jonas' extra patches, I guess it confirms that it works as well on
RK3528:

Tested-by: Willy Tarreau <w at 1wt.eu>

Willy



More information about the linux-arm-kernel mailing list