Using SPI GPIO Bitbang

Hi all,

I’m using a Beaglebone black with Barebox bootloader and want to realize SPI with GPIO Bitbang.

I already have the communication implemented in C, but I can’t get the device tree file to work.

In am33xx.dtsi a normal SPI looks like:

spi0: spi@48030000 {
compatible = “ti,omap4-mcspi”;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x48030000 0x400>;
interrupts = <65>;
ti,spi-num-cs = <2>;
ti,hwmods = “spi0”;
dmas = <&edma 16 0
&edma 17 0
&edma 18 0
&edma 19 0>;
dma-names = “tx0”, “rx0”, “tx1”, “rx1”;
status = “okay”;
};

and it works fine, but how do I make an entry for GPIO bitbang?

For the Raspberry Pi it is something like:

spi: spi@7e204000 {
		compatible = "spi-gpio";
		reg = <0x7e204000 0x1000>;
		interrupts = <2 22>;
		clocks = <&clocks BCM2835_CLOCK_VPU>;
		#address-cells = <1>;
		status = "okay";
		ranges;
		gpio-sck = <&gpio 11 0>;
		gpio-miso = <&gpio 9 0>;
		gpio-mosi = <&gpio 10 0>;
		cs-gpios = <&gpio 8 1>;
		num-chipselects = <1>;
		spidev{
                	compatible = "spidev";
                	reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;
                	spi-max-frequency = <1000000>;
		};

How do I know which Pins to ste for gpio-mosi, gpio-miso, ... and how can I see how the Pins are called on the Pin layout?

How is e.g. GPIO 49 referenced here? Is it something like gpio-mosi = <&gpio 49 0>;?

Thanks a lot and kind Regards,

Kai