spi-gpio on Odroid-C2 board
Subsystems (2)
RFC 1/1 spi-gpio on Odroid-C2 board
Hi
Are there any issues regarding using spi-gpio on Odroid-C2 board dts file? I would like to use it but from what I can see dts still doesn't have it?
I tested something like this and is seems to works:
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +12 -0
@@ -135,6 +135,18 @@ compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; }; + + spi-gpio { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + gpio-sck = <&gpio GPIOX_2 GPIO_ACTIVE_HIGH>; + gpio-miso = <&gpio GPIOX_4 GPIO_ACTIVE_HIGH>; + gpio-mosi = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio GPIOX_1 GPIO_ACTIVE_HIGH + &gpio GPIOY_14 GPIO_ACTIVE_HIGH>; + num-chipselects = <2>; + }; }; &scpi_clocks {
Signature · 1 line
Slawomir Stepien
Quoted 21 lines · Slawomir Stepien
Hi
Are there any issues regarding using spi-gpio on Odroid-C2 board dts file? I would like to use it but from what I can see dts still doesn't have it?
I tested something like this and is seems to works:
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +5
-0@@ -135,6 +135,18 @@ compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; }; + + spi-gpio { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>;
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 152
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +7
-0+ gpio-sck = <&gpio GPIOX_2 GPIO_ACTIVE_HIGH>; + gpio-miso = <&gpio GPIOX_4 GPIO_ACTIVE_HIGH>; + gpio-mosi = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio GPIOX_1 GPIO_ACTIVE_HIGH + &gpio GPIOY_14 GPIO_ACTIVE_HIGH>; + num-chipselects = <2>; + }; }; &scpi_clocks {
Hi Slawomir,
Thanks for testing the spi-gpio interface, but since these pins are not explicitely used as SPI, there is no real need to have them in the upstream Odroid-C2 dts file.
Such entries should added locally for each local projects.
Neil