Message ID | 20210820180801.561119-5-cmirabil@redhat.com |
---|---|
State | New |
Headers | show |
Series | Raspberry Pi Sense HAT driver | expand |
Hi Charles, On Fri, 2021-08-20 at 14:08 -0400, Charles Mirabile wrote: > This patch is an RFC. The overlay included here is suitable for the > Sense HAT but we are not sure where overlays like this should go, or if we > should even include it, because the Raspberry Pi kernel tree already > includes that device tree blob that this was based on and most > distributions for the Raspberry Pi include those blobs. > > The overlay is just in the root of the source tree since we did not know > where to put it so this patch should not be merged in this state. > > Signed-off-by: Charles Mirabile <cmirabil@redhat.com> > Signed-off-by: Mwesigwa Guma <mguma@redhat.com> > Signed-off-by: Joel Savitz <jsavitz@redhat.com> > --- Once we get this merged, and since upstream doesn't yet mantain overlays, I suggest you merge this overlay in the downstream rpi kernel repo, who actively maintain them. AFAIK a number of distros use that repo as the base for their devicetrees. That said, I think providing a devicetree binding for this driver is a must for it to be merged (in yaml form). Regards, Nicolas
On 20/08/2021 20:08, Charles Mirabile wrote: > This patch is an RFC. The overlay included here is suitable for the > Sense HAT but we are not sure where overlays like this should go, or if we > should even include it, because the Raspberry Pi kernel tree already > includes that device tree blob that this was based on and most > distributions for the Raspberry Pi include those blobs. > > The overlay is just in the root of the source tree since we did not know > where to put it so this patch should not be merged in this state. > > Signed-off-by: Charles Mirabile <cmirabil@redhat.com> > Signed-off-by: Mwesigwa Guma <mguma@redhat.com> > Signed-off-by: Joel Savitz <jsavitz@redhat.com> > --- > sensehat.dtbs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 sensehat.dtbs > > diff --git a/sensehat.dtbs b/sensehat.dtbs > new file mode 100644 > index 000000000000..3f1c12c8f75f > --- /dev/null > +++ b/sensehat.dtbs > @@ -0,0 +1,51 @@ > +/dts-v1/; > + > +/ { > + compatible = "brcm,bcm2835"; > + > + fragment@0 { > + target = <0xffffffff>; > + > + __overlay__ { > + #address-cells = <0x01>; > + #size-cells = <0x00>; > + status = "okay"; > + > + sensehat@46 { > + compatible = "raspberrypi,sensehat"; > + reg = <0x46>; > + keys-int-gpios = <0xffffffff 0x17 0x01>; > + status = "okay"; > + }; > + > + lsm9ds1-magn@1c { > + compatible = "st,lsm9ds1-magn"; > + reg = <0x1c>; > + status = "okay"; > + }; > + > + lsm9ds1-accel6a { > + compatible = "st,lsm9ds1-accel"; > + reg = <0x6a>; > + status = "okay"; > + }; > + > + lps25h-press@5c { > + compatible = "st,lps25h-press"; > + reg = <0x5c>; > + status = "okay"; > + }; > + > + hts221-humid@5f { > + compatible = "st,hts221-humid\0st,hts221"; Isn't "st,hts221" good enough? > + reg = <0x5f>; > + status = "okay"; > + }; > + }; > + }; > + > + __fixups__ { > + i2c1 = "/fragment@0:target:0"; > + gpio = "/fragment@0/__overlay__/sensehat@46:keys-int-gpios:0"; > + }; > +}; > As Nicolas said, yaml bindings are a must. The overlay can be added as for convenience to the series but it should be made clear that it is not supposed to be upstreamed. Regards, Matthias
diff --git a/sensehat.dtbs b/sensehat.dtbs new file mode 100644 index 000000000000..3f1c12c8f75f --- /dev/null +++ b/sensehat.dtbs @@ -0,0 +1,51 @@ +/dts-v1/; + +/ { + compatible = "brcm,bcm2835"; + + fragment@0 { + target = <0xffffffff>; + + __overlay__ { + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + sensehat@46 { + compatible = "raspberrypi,sensehat"; + reg = <0x46>; + keys-int-gpios = <0xffffffff 0x17 0x01>; + status = "okay"; + }; + + lsm9ds1-magn@1c { + compatible = "st,lsm9ds1-magn"; + reg = <0x1c>; + status = "okay"; + }; + + lsm9ds1-accel6a { + compatible = "st,lsm9ds1-accel"; + reg = <0x6a>; + status = "okay"; + }; + + lps25h-press@5c { + compatible = "st,lps25h-press"; + reg = <0x5c>; + status = "okay"; + }; + + hts221-humid@5f { + compatible = "st,hts221-humid\0st,hts221"; + reg = <0x5f>; + status = "okay"; + }; + }; + }; + + __fixups__ { + i2c1 = "/fragment@0:target:0"; + gpio = "/fragment@0/__overlay__/sensehat@46:keys-int-gpios:0"; + }; +};