[PATCH 0/6] staging: bcm2835-firmware-gpio: Initial staging commit

Michael Zoran mzoran at crowfest.net
Fri Mar 17 08:22:15 PDT 2017


The firmware now has a mailbox API for performing generalized gpio through
the firmware.  This driver builds upon a driver written by Dave Stevenson
that was written specifically for the expander on the RPI 3, but I have 
generalized for generic GPIO through the firmware.

With this change I was able to test VC4 on a RPI 3 running in arm64 with
a pure mainline tree from the staging branch.   

The firmware gpio numbers are currently documented at:
https://github.com/raspberrypi/firmware/blob/master/extra/dt-blob.dts

My test dts for arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts:

/dts-v1/;
#include "bcm2837.dtsi"
#include "bcm2835-rpi.dtsi"
#include "bcm283x-rpi-smsc9514.dtsi"
#include "bcm283x-rpi-usb-host.dtsi"

/ {
	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
	model = "Raspberry Pi 3 Model B";

	memory {
		reg = <0 0x40000000>;
	};

	leds {
		act {
			gpios = <&gpio 47 0>;
		};
	};

        soc {
		firmwaregpio: firmwaregpio {
			compatible = "brcm,bcm2835-firmware-gpio";
			number-gpios = <256>;
			gpio-base = <128>;
			firmware-gpio-base = <0>;
			gpio-controller;
			#gpio-cells = <2>;
			firmware = <&firmware>;
		};

		hdmi {
			hpd-gpios = <&firmwaregpio 132 GPIO_ACTIVE_LOW>;
		};


	};

};

&uart1 {
	status = "okay";
};

Dave Stevenson (1):
  bcm2835-gpio-exp: Driver for GPIO expander via mailbox service

Michael Zoran (5):
  staging: bcm2835-firmware-gpio: Add needed mailbox defines to driver
  staging: bcm2835-firmware-gpio: Expand DT options for driver
  staging: bcm2835-firmware-gpio: Add brcm,bcm2835-firmware-gpio to
    compatible list
  staging: bcm2835-firmware-gpio: Add a build system for the driver
  staging: vc04_services: Update makefile to use CONFIG_BCM_VIDEOCORE

 drivers/staging/Makefile                           |   2 +-
 drivers/staging/vc04_services/Kconfig              |   2 +
 drivers/staging/vc04_services/Makefile             |   1 +
 .../vc04_services/bcm2835-firmware-gpio/Kconfig    |   6 +
 .../vc04_services/bcm2835-firmware-gpio/Makefile   |   5 +
 .../bcm2835-firmware-gpio/gpio-bcm-exp.c           | 282 +++++++++++++++++++++
 6 files changed, 297 insertions(+), 1 deletion(-)
 create mode 100644 drivers/staging/vc04_services/bcm2835-firmware-gpio/Kconfig
 create mode 100644 drivers/staging/vc04_services/bcm2835-firmware-gpio/Makefile
 create mode 100644 drivers/staging/vc04_services/bcm2835-firmware-gpio/gpio-bcm-exp.c

-- 
2.11.0




More information about the linux-rpi-kernel mailing list