Forum | Documentation | Website | Blog

Skip to content

nfc: st95hf: add enable-gpio via platform data

This is a hack to work with the mikroBUS driver.

I've not been able to get the device to work properly yet.

debian@BeaglePlay:~$ cat /home/debian/manifesto/manifests/RFID-CLICK.mnfs
;
; RFID CLICK
; https://www.mikroe.com/rfid-click
; CONFIG_NFC_ST95HF
;
; Copyright 2023 Jason Kridner, BeagleBoard.org Foundation 
;

[manifest-header]
version-major = 0
version-minor = 1

[interface-descriptor]
vendor-string-id = 0x1
product-string-id = 0x2

[mikrobus-descriptor]
pwm-state = 0x3
int-state = 0x1
rx-state = 0x7
tx-state = 0x7
scl-state = 0x6
sda-state = 0x6
mosi-state = 0x5
miso-state = 0x5
sck-state = 0x5
cs-state = 0x5
rst-state = 0x3
an-state = 0x2

[device-descriptor 0x1]
driver-string-id = 0x3
protocol = 0xb
reg = 0x0
irq = 0x1
irq-type = 0x2
max-speed-hz = 0xf4240
mode = 0x0
prop-link = 0x0
gpio-link = 0x1
reg-link = 0x0
clock-link = 0x0

[property-descriptor 0x1]
name-string-id = 4
type = 2
value = <2>

[property-descriptor 0x2]
name-string-id = 5
type = 3
value = <0>

[string-descriptor 0x1]
string = MikroE

[string-descriptor 0x2]
string = RFID Click

[string-descriptor 0x3]
string = st95hf

[string-descriptor 0x4]
string = gpio-link

[string-descriptor 0x5]
string = enable

; 'Bridged PHY' class on Bundle 1
[bundle-descriptor 0x1]
class = 0xa

; 'SPI' protocol on CPort 1
[cport-descriptor 0x1]
bundle = 0x1
protocol = 0xb

debian@BeaglePlay:~$ sudo ./manifesto -I mnfs /home/debian/manifesto/manifests/RFID-CLICK.mnfs -o /sys/bus/mikrobus/devices/mikrobus-0/new_device
debian@BeaglePlay:~$ dmesg | tail -24
[129383.059091] mikrobus mikrobus-0: removing device st95hf
[129538.747142] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=st95hf, protocol=11, reg=0
[129538.747159] mikrobus_manifest:mikrobus_manifest_attach_device: device 1, number of gpio resource=1
[129538.747167] mikrobus_manifest:mikrobus_manifest_parse:  RFID Click manifest parsed with 1 devices
[129538.747224] mikrobus:mikrobus_port_pinctrl_select: setting pinctrl pwm_gpio
[129538.747233] mikrobus:mikrobus_port_pinctrl_select: setting pinctrl uart_default
[129538.747241] mikrobus:mikrobus_port_pinctrl_select: setting pinctrl i2c_default
[129538.747250] mikrobus:mikrobus_port_pinctrl_select: setting pinctrl spi_default
[129538.747283] mikrobus mikrobus-0: registering device : st95hf
[129538.747290] mikrobus mikrobus-0:  adding lookup table : spi1.0
[129538.747903] st95hf spi1.0: NFC: ST95HF driver probe called.
[129538.747929] st95hf spi1.0: No valid enable gpio found in DT, trying platform data
[129539.813067] st95hf spi1.0: error: response not ready timeout
[129539.819664] st95hf spi1.0: st95hf_spi_send failed with error -110
[129539.826057] st95hf spi1.0: response from echo function = 0xffffff92, attempt = 1
[129540.933077] st95hf spi1.0: error: response not ready timeout
[129540.938921] st95hf spi1.0: st95hf_spi_send failed with error -110
[129540.945204] st95hf spi1.0: response from echo function = 0xffffff92, attempt = 2
[129542.021053] st95hf spi1.0: error: response not ready timeout
[129542.026913] st95hf spi1.0: st95hf_spi_send failed with error -110
[129542.033243] st95hf spi1.0: response from echo function = 0xffffff92, attempt = 3
[129542.112427] st95hf spi1.0: err: por seq failed for st95hf
[129542.118487] st95hf: probe of spi1.0 failed with error -110
Edited by Jason Kridner

Merge request reports