devicetree: bcm2835:

Martin Sperl kernel at martin.sperl.org
Mon Aug 10 22:53:22 PDT 2015



On 11.08.2015 06:21, Stephen Warren wrote:
> On 08/10/2015 02:41 AM, Martin Sperl wrote:
>> Hi!
>>
>> When adding a gpio section to enable the auxiliar spi device pins
>> with the correct mode to the bcm2835 device treesimilar to this:
>>          /* SPI1 pins */
>>          spi1_pins: spi1_pins {
>>                  brcm,pins = <19 20 21>;
>>                  brcm,function = <BCM2835_FSEL_ALT4>
>>          };
>>          /* SPI1 GPIO-chipselects */
>>          spi1_cs_pins: spi1_cs_pins {
>>                  brcm,pins = <18 17 16>;
>>                  brcm,function = <BCM2835_FSEL_OUT>;
>>          };
>>
>>          /* SPI2 pins */
>>          spi2_pins: spi2_pins {
>>                  brcm,pins = <40 41 42>;
>>                  brcm,function = <BCM2835_FSEL_ALT4>;
>>          };
>>          /* SPI2 GPIO-chipselects */
>>          spi2_cs_pins: spi2_cs_pins {
>>                  brcm,pins = <43 44 45>;
>>                  brcm,function = <BCM2835_FSEL_OUT>
>>          };
>
> You don't need to add all that to the SPI node. Just set up the existing
> pinctrl configurations in the pinctrl node as you need them. Per-device
> DT configuration nodes are useful if you need to do dynamic pinmuxing,
> but there's no need for that to simply set up the usage of the SPI/I2C
> pins at boot.
>
So does this mean I should NOT provide some default dt-configs for the 
device tree pin-mux when sending the patch?

So why do we have PWM0 pin-modes configured in 
arch/arm/boot/dts/bcm2835-rpi.dtsi
and I2S in arch/arm/boot/dts/bcm2835-rpi-b.dts and in
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts.

Would we need separate device-trees (dts) to use spi1/2?
e.g arch/arm/boot/dts/bcm2835-rpi-b-auxspi.dts
Note that this would also require that PIN 40 configuration gets moved
out ?

Just wanting to make sure that there is nothing missing when I submit
the patches for spi-bcm2835aux (plus the bcm2835-aux enable driver).

Thanks,
	Martin



More information about the linux-rpi-kernel mailing list