Message ID | 20230501084401.765169-1-cristian.ciocaltea@collabora.com |
---|---|
Headers | show |
Series | Add RK3588 OTP memory support | expand |
On 5/2/23 11:26, Vincent Legoll wrote: > Hello, > > On Mon, May 1, 2023 at 8:44 AM Cristian Ciocaltea > <cristian.ciocaltea@collabora.com> wrote: >> This patch series adds OTP memory support for Rockchip RK3588 SoC, >> while also providing a few improvements to the existing rockchip-otp >> driver, in addition to converting the bindings to dt-schema. > > I tested this on a QuartzPro64 dev board, I applied your series top of my tree: > Collabora's rk3588-v6.3 + some DT patches to add support for the qp64 board. > > Here is the output from the commands you told me to try: > > # ls -1 /sys/bus/nvmem/devices/*/nvmem > /sys/bus/nvmem/devices/rockchip-otp0/nvmem > > # od -N 64 -A x -t x1z -v /sys/bus/nvmem/devices/rockchip-otp0/nvmem > 000000 52 4b 35 88 91 fe 21 41 5a 43 39 36 00 00 00 00 >RK5...!AZC96....< > 000010 00 00 00 00 0f 0b 0d 0a 0a 0c 25 0e 00 00 00 00 >..........%.....< > 000020 00 00 00 00 00 00 00 00 08 0c 00 00 00 00 00 00 >................< > 000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................< > 000040 > > This is working as expected. > > You can add my T-B, for the whole series: > > Tested-by: Vincent Legoll <vincent.legoll@gmail.com> Thanks for testing! Regards, Cristian
On 5/2/23 11:47, Heiko Stübner wrote: > Am Montag, 1. Mai 2023, 10:43:55 CEST schrieb Cristian Ciocaltea: >> In preparation to support new Rockchip OTP memory devices with different >> clock configurations and register layout, extend rockchip_data struct >> with the related members: clocks, num_clks, reg_read. >> >> Additionally, to avoid managing redundant driver data, drop num_clks >> member from rockchip_otp struct and update all references to point to >> the equivalent member in rockchip_data. >> >> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> >> --- >> drivers/nvmem/rockchip-otp.c | 79 ++++++++++++++++++++++-------------- >> 1 file changed, 49 insertions(+), 30 deletions(-) >> >> diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c >> index 9f53bcce2f87..a5b234e60735 100644 >> --- a/drivers/nvmem/rockchip-otp.c >> +++ b/drivers/nvmem/rockchip-otp.c >> @@ -54,21 +54,19 @@ >> >> #define OTPC_TIMEOUT 10000 >> >> +struct rockchip_data { >> + int size; >> + const char * const *clocks; >> + int num_clks; > > nit: might be nice to use either "clocks" or "clks" as part for both names Indeed, will handle this in v2. > other than that > Reviewed-by: Heiko Stuebner <heiko@sntech.de> Thanks, Cristian