PebbleOS v4.47.0-160-g9e782207f
Loading...
Searching...
No Matches

SiFli SF32LB low-power CPU. More...

Data Structures

struct  pbl_rproc_sf32lb_range
 Memory as the LCPU sees it, from dma-ranges. More...
 
struct  pbl_rproc_sf32lb
 SF32LB LCPU. More...
 
struct  pbl_rproc_sf32lb.rf
 Blocks the radio calibration programs, by base address. More...
 

Macros

#define PBL_RPROC_SF32LB_DEFINE(sym, _name, _patch_base, _tx_chan, _rx_chan, _mem_base, _mem_size, _sram_base, _sram_size, _r0_da, _r0_pa, _r0_size, _r1_da, _r1_pa, _r1_size, _hclk, _pclk, _pclk2, _lpclk, _rfc, _phy, _capture, _mac, _gpadc, _dmac, _lpsys_rcc, _hpsys_cfg, _pmuc)
 Define the LCPU.
 

Functions

uintptr_t pbl_rproc_sf32lb_da (const struct pbl_rproc_sf32lb *lcpu, uintptr_t pa)
 The address at which the LCPU sees memory of this CPU.
 

Detailed Description

SiFli SF32LB low-power CPU.

The LCPU runs the Bluetooth controller from ROM, which the driver configures, patches and calibrates on start. The controller exchanges HCI with the HCPU over byte rings signalled with a pair of doorbells; the LCPU to HCPU ring sits in LPSYS RAM, the HCPU to LCPU one in HCPU RAM reserved for it, whose address the driver hands to the ROM. The HCI transport takes the doorbells and the region from here.


Data Structure Documentation

◆ pbl_rproc_sf32lb_range

struct pbl_rproc_sf32lb_range

Memory as the LCPU sees it, from dma-ranges.

Data Fields
uintptr_t da Address on the LCPU.
uintptr_t pa Address on this CPU.
size_t size Size in bytes.

◆ pbl_rproc_sf32lb

struct pbl_rproc_sf32lb

SF32LB LCPU.

Data Fields
struct pbl_clk hclk LCPU clock, and the APB clocks of LPSYS, set for the LCPU to load.
struct pbl_clk lpclk Low-power clock, from the RTC: the crystal or the RC oscillator.
struct pbl_mem_region mem HCPU RAM reserved for the HCPU to LCPU ring (memory-region).
uintptr_t patch_base ROM patch controller base address.
struct pbl_clk pclk LPSYS APB clock.
struct pbl_clk pclk2 LPSYS second APB clock.
struct pbl_rproc_sf32lb_range ranges[2] Memory as the LCPU sees it: LPSYS SRAM through its code bus, then HPSYS SRAM.
struct pbl_rproc_sf32lb.rf rf Blocks the radio calibration programs, by base address.
struct pbl_rproc rproc Remote processor.
struct pbl_mbox_chan rx_chan Doorbell from the LCPU (mboxes entry rx).
struct pbl_mem_region sram LPSYS SRAM region the LCPU works in (sram).
struct pbl_mbox_chan tx_chan Doorbell to the LCPU (mboxes entry tx).

◆ pbl_rproc_sf32lb.rf

struct pbl_rproc_sf32lb.rf

Blocks the radio calibration programs, by base address.

Data Fields
uintptr_t capture PHY sample capture window (sifli,bt-phy, second region).
uintptr_t dmac DMA controller (sifli,dmac).
uintptr_t gpadc ADC (sifli,gpadc).
uintptr_t hpsys_cfg HPSYS configuration (sifli,hpsys-cfg).
uintptr_t lpsys_rcc LPSYS clock and reset controller (sifli,lpsys-rcc).
uintptr_t mac Bluetooth controller (sifli,bt-mac).
uintptr_t phy Bluetooth PHY (sifli,bt-phy).
uintptr_t pmuc Power management unit (sifli,pmuc).
uintptr_t rfc Bluetooth RF controller (sifli,bt-rfc).

Macro Definition Documentation

◆ PBL_RPROC_SF32LB_DEFINE

#define PBL_RPROC_SF32LB_DEFINE (   sym,
  _name,
  _patch_base,
  _tx_chan,
  _rx_chan,
  _mem_base,
  _mem_size,
  _sram_base,
  _sram_size,
  _r0_da,
  _r0_pa,
  _r0_size,
  _r1_da,
  _r1_pa,
  _r1_size,
  _hclk,
  _pclk,
  _pclk2,
  _lpclk,
  _rfc,
  _phy,
  _capture,
  _mac,
  _gpadc,
  _dmac,
  _lpsys_rcc,
  _hpsys_cfg,
  _pmuc 
)
Value:
PBL_RPROC_SF32LB_COREDUMP_DEFINE(sym, _sram_base, _sram_size); \
PBL_RPROC_STATE_DEFINE(sym); \
PBL_DEVICE_INSTANCE(sym, struct pbl_rproc_sf32lb, struct pbl_rproc, rproc) { \
.rproc = PBL_RPROC_INIT(sym, _name, pbl_rproc_sf32lb_init, nullptr, &pbl_rproc_sf32lb_ops), \
.patch_base = _patch_base, .tx_chan = _tx_chan, .rx_chan = _rx_chan, \
.mem = PBL_MEM_REGION(_mem_base, _mem_size), .sram = PBL_MEM_REGION(_sram_base, _sram_size), \
.ranges = {{(_r0_da), (_r0_pa), (_r0_size)}, {(_r1_da), (_r1_pa), (_r1_size)}}, .hclk = _hclk, \
.pclk = _pclk, .pclk2 = _pclk2, .lpclk = _lpclk, \
.rf = { \
.rfc = _rfc, \
.phy = _phy, \
.capture = _capture, \
.mac = _mac, \
.gpadc = _gpadc, \
.dmac = _dmac, \
.lpsys_rcc = _lpsys_rcc, \
.hpsys_cfg = _hpsys_cfg, \
.pmuc = _pmuc \
}, \
}
#define PBL_MEM_REGION(_base, _size)
Initializer of a struct pbl_mem_region.
Definition device.h:121
SF32LB LCPU.
Definition sf32lb.h:39
Remote processor.
Definition remoteproc.h:53
#define PBL_RPROC_INIT(sym, _name, _init, _deps, _ops)
Initializer of a struct pbl_rproc, for providers.
Definition remoteproc.h:80

Define the LCPU.

Parameters
symSymbol.
_nameDevice name.
_patch_baseROM patch controller base address.
_tx_chanDoorbell to the LCPU, from PBL_MBOX_CHAN().
_rx_chanDoorbell from the LCPU, from PBL_MBOX_CHAN().
_mem_baseBase of the HCPU RAM reserved for the HCPU to LCPU ring.
_mem_sizeIts size, in bytes.
_sram_baseBase of the LPSYS SRAM region the LCPU works in.
_sram_sizeIts size, in bytes.
_r0_daLCPU address of LPSYS SRAM through its code bus.
_r0_paIts address on this CPU.
_r0_sizeIts size, in bytes.
_r1_daLCPU address of HPSYS SRAM.
_r1_paIts address on this CPU.
_r1_sizeIts size, in bytes.
_hclkLCPU clock, from PBL_CLK().
_pclkLPSYS APB clock, from PBL_CLK().
_pclk2LPSYS second APB clock, from PBL_CLK().

Function Documentation

◆ pbl_rproc_sf32lb_da()

uintptr_t pbl_rproc_sf32lb_da ( const struct pbl_rproc_sf32lb *  lcpu,
uintptr_t  pa 
)

The address at which the LCPU sees memory of this CPU.

Parameters
lcpuLCPU.
paAddress on this CPU.
Returns
The address on the LCPU, or 0 if it cannot reach pa.