mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/1] Timeout error with Microchip OTPC driver on SAM9X60
Date: Fri, 12 Apr 2024 16:08:01 +0200	[thread overview]
Message-ID: <20240412140802.1571935-1-ada@thorsis.com> (raw)

Hei hei,

on a custom sam9x60 based board we want to access a unique ID of the
SoC.  Microchip sam-ba has a command 'readuniqueid' which returns the
content of the OTPC Product UID x Register in that case.

(On a different board with a SAMA5D2 we use the Serial Number x Register
exposed through the atmel soc driver, which is not present in the
SAM9X60 series.)

There is a driver for the OTPC of the SAMA7G5 and after comparing
register layouts it seems that one is almost identical to the one used
by SAM9X60.  So I thought just adapting the driver for SAM9X60 should be
easy.  (At least as a start, the driver has no support for that UID
register, but I suppose it would be the right place to implement it.)

However it does not work.  I used the patch attached with
additional debug messages on a SAM9X60-Curiosity board.  (That patch is
not meant for inclusion, just for showing what I've tried.)

On probe the function mchp_otpc_init_packets_list() returns with
ETIMEDOUT, which it can only do if mchp_otpc_prepare_read() returns with
timeout and that can only happen if read_poll_timeout() times out on
reading the Status Register.  Poking that register with `devmem
0xeff0000c 32` gives 0x00000040 which means "A packet read is on-going".

Kinda stuck here.  Any ideas?

Greets and have a nice weekend everyone
Alex

Alexander Dahl (1):
  nvmem: microchip-otpc: Add support for SAM9X60

 .../dts/microchip/at91-sam9x60_curiosity.dts     |  4 ++++
 arch/arm/boot/dts/microchip/sam9x60.dtsi         |  7 +++++++
 drivers/nvmem/microchip-otpc.c                   | 16 +++++++++++++---
 3 files changed, 24 insertions(+), 3 deletions(-)


base-commit: fec50db7033ea478773b159e0e2efb135270e3b7
-- 
2.39.2


             reply	other threads:[~2024-04-12 14:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 14:08 Alexander Dahl [this message]
2024-04-12 14:08 ` [RFC PATCH 1/1] nvmem: microchip-otpc: Add support for SAM9X60 Alexander Dahl
2024-04-24  7:32 ` [RFC PATCH 0/1] Timeout error with Microchip OTPC driver on SAM9X60 claudiu beznea
2024-07-01  7:40   ` Alexander Dahl
2024-08-13  8:55   ` Alexander Dahl
2024-08-20 11:59     ` claudiu beznea
2024-08-20 13:48       ` Alexander Dahl

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=20240412140802.1571935-1-ada@thorsis.com \
    --to=ada@thorsis.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®