diff --git a/port/platform/zephyr/README.md b/port/platform/zephyr/README.md index a5633139..23420c77 100644 --- a/port/platform/zephyr/README.md +++ b/port/platform/zephyr/README.md @@ -153,8 +153,14 @@ You will need an entry with `status = "okay"` for the device you intend to use ( # device it must be given as a STRING transport-type = "uart0"; module-type = "U_CELL_MODULE_TYPE_SARA_R422"; - # Pin numbers assume 32 pins per gpio, so the pin for - # <&gpio1 0 x> would be pin 32 + # The ubxlib pin number is simply an integer counting up from zero, + # so you will need to know the number of pins per GPIO port on your + # MCU to work it out. For nRF52/nRF53 there are 32 pins per GPIO + # port, so the pin for <&gpio1 0 x> would be pin 32, while for + # STM32 therea are 16 pins per GPIO port which is easiest to comprehend + # when expressed in hex, so <&gpiob 0 x> (the STM32 GPIO device tree + # entries use a letter rather than a number), pin PB0 would be 0x10, + # <&gpiof 14 x>, pin PF14, would be 0x5e, etc. pin-pwr-on = <10>; pin-vint = <35>; # This SARA-R422 device has GNSS inside it, which is indicated by diff --git a/port/platform/zephyr/dts/bindings/u-blox,ubxlib-device-cellular.yaml b/port/platform/zephyr/dts/bindings/u-blox,ubxlib-device-cellular.yaml index 09f0ad2b..93e3adec 100644 --- a/port/platform/zephyr/dts/bindings/u-blox,ubxlib-device-cellular.yaml +++ b/port/platform/zephyr/dts/bindings/u-blox,ubxlib-device-cellular.yaml @@ -37,19 +37,19 @@ properties: # pinEnablePower pin-enable-power: type: int - description: "The GPIO output pin (an integer, assuming 32 pins per GPIO bank) that enables power to the cellular module (e.g. through a relay or some such); not usually required." + description: "The GPIO output pin (an integer, counting from zero up through the GPIO banks) that enables power to the cellular module (e.g. through a relay or some such); not usually required." # pinPwrOn pin-pwr-on: type: int - description: "The GPIO output pin (an integer, assuming 32 pins per GPIO bank) that is connected to the PWR_ON pin of the cellular module." + description: "The GPIO output pin (an integer, counting from zero up through the GPIO banks) that is connected to the PWR_ON pin of the cellular module." # pinVint pin-vint: type: int - description: "The GPIO input pin (an integer, assuming 32 pins per GPIO bank) that is connected to the VINT pin of the cellular module." + description: "The GPIO input pin (an integer, counting from zero up through the GPIO banks) that is connected to the VINT pin of the cellular module." # pinDtrPowerSaving pin-dtr-power-saving: type: int - description: "The GPIO output pin (an integer, assuming 32 pins per GPIO bank) that is connected to the DTR pin of the cellular module because you intend to use the DTR pin to tell the module whether it can enter power-saving." + description: "The GPIO output pin (an integer, counting from zero up through the GPIO banksk) that is connected to the DTR pin of the cellular module because you intend to use the DTR pin to tell the module whether it can enter power-saving." # Associated network configurations network: type: phandles diff --git a/port/platform/zephyr/dts/bindings/u-blox,ubxlib-device-gnss.yaml b/port/platform/zephyr/dts/bindings/u-blox,ubxlib-device-gnss.yaml index 75f70fe7..abc21c8f 100644 --- a/port/platform/zephyr/dts/bindings/u-blox,ubxlib-device-gnss.yaml +++ b/port/platform/zephyr/dts/bindings/u-blox,ubxlib-device-gnss.yaml @@ -39,7 +39,7 @@ properties: # pinSelect for SPI spi-pin-select: type: int - description: "The GPIO output pin (an integer, assuming 32 pins per GPIO bank) to use for SPI chip select; if you do not specify a pin then spi-index-select is used and if spi-index-select is not specified index 0 is used." + description: "The GPIO output pin (an integer, counting from zero up through the GPIO banks) to use for SPI chip select; if you do not specify a pin then spi-index-select is used and if spi-index-select is not specified index 0 is used." # indexSelect for SPI spi-index-select: type: int @@ -89,11 +89,11 @@ properties: # pinEnablePower pin-enable-power: type: int - description: "The GPIO output pin (an integer, assuming 32 pins per GPIO bank) that enables power to the GNSS device (e.g. through a relay or some such); not usually required." + description: "The GPIO output pin (an integer, counting from zero up through the GPIO banks) that enables power to the GNSS device (e.g. through a relay or some such); not usually required." # pinDataReady pin-data-ready: type: int - description: "The GPIO output pin (an integer, assuming 32 pins per GPIO bank) that is connected to the Data Ready pin of the GNSS device; provided for future compatibility only, currently ignored." + description: "The GPIO output pin (an integer,counting from zero up through the GPIO banks) that is connected to the Data Ready pin of the GNSS device; provided for future compatibility only, currently ignored." # i2cAddress i2c-address: type: int