Message ID | 20190520142330.3556-1-angus@akkea.ca |
---|---|
Headers | show |
Series | Add support for the Purism Librem5 devkit | expand |
Hi! > This is for the development kit board for the Librem 5. The current level > of support yields a working console and is able to boot userspace from > the network or eMMC. > > Additional subsystems that are active : > - haptic motor Haptic motor is not a LED. It should be controlled by input subsystem. > + pwmleds { > + compatible = "pwm-leds"; > + > + haptic { > + label = "librem5::haptic"; > + pwms = <&pwm2 0 200000>; > + active-low; > + max-brightness = <255>; > + power-supply = <®_3v3_p>; > + }; > + }; You can take a look at N900, that has reasonable interface. Thanks, Pavel
Hi! > - LEDs > - gyro > - magnetometer > + leds { > + compatible = "gpio-leds"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_gpio_leds>; > + > + led1 { > + label = "LED 1"; So, what kind of LED do you have, and what color is it? label should probably be something like notify:green. > + charger@6b { /* bq25896 */ > + compatible = "ti,bq25890"; > + reg = <0x6b>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_charger>; > + interrupt-parent = <&gpio3>; > + interrupts = <25 IRQ_TYPE_EDGE_FALLING>; > + ti,battery-regulation-voltage = <4192000>; /* 4.192V */ > + ti,charge-current = <1600000>; /* 1.6 A */ No space before A, for consistency. > + ti,termination-current = <66000>; /* 66mA */ > + ti,precharge-current = <1300000>; /* 1.3A */ I thought precharge is usually something low, because you are not yet sure of battery health...? > + ti,minimum-sys-voltage = <2750000>; /* 2.75V */ Are you sure? Normally systems shut down at 3.2V, 3V or so. Li-ion batteries don't really like to be discharged _this_ deep. Pavel
Hi Pavel, On 2019-05-23 12:19, Pavel Machek wrote: > Hi! > >> This is for the development kit board for the Librem 5. The current >> level >> of support yields a working console and is able to boot userspace from >> the network or eMMC. >> >> Additional subsystems that are active : > >> - haptic motor > > Haptic motor is not a LED. It should be controlled by input subsystem. > >> + pwmleds { >> + compatible = "pwm-leds"; >> + >> + haptic { >> + label = "librem5::haptic"; >> + pwms = <&pwm2 0 200000>; >> + active-low; >> + max-brightness = <255>; >> + power-supply = <®_3v3_p>; >> + }; >> + }; > > You can take a look at N900, that has reasonable interface. > I wanted to control the haptic with the pwm-vibra driver but "fsl,imx27-pwm" doesn't seem to respect the PWM_POLARITY_INVERTED flag so when I start the system the vibrator is full on. I could use gpio-vibrator but that seemed like a waste when the device is connected to pwm. I figured the using the pwm-leds interface was a reasonable compromise until I had an opportunity to make changes the the imx27-pwm driver. Thanks Angus > Thanks, > Pavel
Hi! > >>This is for the development kit board for the Librem 5. The current > >>level > >>of support yields a working console and is able to boot userspace from > >>the network or eMMC. > >> > >>Additional subsystems that are active : > > > >>- haptic motor > > > >Haptic motor is not a LED. It should be controlled by input subsystem. > > > >>+ pwmleds { > >>+ compatible = "pwm-leds"; > >>+ > >>+ haptic { > >>+ label = "librem5::haptic"; > >>+ pwms = <&pwm2 0 200000>; > >>+ active-low; > >>+ max-brightness = <255>; > >>+ power-supply = <®_3v3_p>; > >>+ }; > >>+ }; > > > >You can take a look at N900, that has reasonable interface. > > I wanted to control the haptic with the pwm-vibra driver but "fsl,imx27-pwm" > doesn't seem to respect the PWM_POLARITY_INVERTED flag so when I start the > system the vibrator is full on. Ok, lets fix that :-). > I could use gpio-vibrator but that seemed like a waste when the device is > connected to pwm. > > I figured the using the pwm-leds interface was a reasonable compromise until > I had an opportunity to make changes the the imx27-pwm driver. I guess in such case it would be best to leave out this section for now... or keep it disabled / something. We don't want incorrect device trees to stick around. Thanks, Pavel
Hi Pavel, On 2019-05-23 12:19, Pavel Machek wrote: > Hi! > >> - LEDs >> - gyro >> - magnetometer > >> + leds { >> + compatible = "gpio-leds"; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&pinctrl_gpio_leds>; >> + >> + led1 { >> + label = "LED 1"; > > So, what kind of LED do you have, and what color is it? label should > probably be something like > notify:green. > As we don't have a specific use for these yet does it really matter if there is a colour or a number associated with them ? >> + charger@6b { /* bq25896 */ >> + compatible = "ti,bq25890"; >> + reg = <0x6b>; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&pinctrl_charger>; >> + interrupt-parent = <&gpio3>; >> + interrupts = <25 IRQ_TYPE_EDGE_FALLING>; >> + ti,battery-regulation-voltage = <4192000>; /* 4.192V */ >> + ti,charge-current = <1600000>; /* 1.6 A */ > > No space before A, for consistency. > >> + ti,termination-current = <66000>; /* 66mA */ >> + ti,precharge-current = <1300000>; /* 1.3A */ > > I thought precharge is usually something low, because you are not yet > sure of battery health...? > I think I put that in incorrectly. The intention was 130mA. >> + ti,minimum-sys-voltage = <2750000>; /* 2.75V */ > > Are you sure? Normally systems shut down at 3.2V, 3V or so. Li-ion > batteries don't > really like to be discharged _this_ deep. You are correct. I'll fix it for the next version. Thanks Angus > > Pavel
Hi Pavel, On 2019-05-24 15:00, Angus Ainslie wrote: > Hi Pavel, > > On 2019-05-23 12:19, Pavel Machek wrote: >> Hi! >> >>> - LEDs >>> - gyro >>> - magnetometer >> >>> + leds { >>> + compatible = "gpio-leds"; >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&pinctrl_gpio_leds>; >>> + >>> + led1 { >>> + label = "LED 1"; >> >> So, what kind of LED do you have, and what color is it? label should >> probably be something like >> notify:green. >> > > As we don't have a specific use for these yet does it really matter if > there is a colour or a number associated with them ? > >>> + charger@6b { /* bq25896 */ >>> + compatible = "ti,bq25890"; >>> + reg = <0x6b>; >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&pinctrl_charger>; >>> + interrupt-parent = <&gpio3>; >>> + interrupts = <25 IRQ_TYPE_EDGE_FALLING>; >>> + ti,battery-regulation-voltage = <4192000>; /* 4.192V */ >>> + ti,charge-current = <1600000>; /* 1.6 A */ >> >> No space before A, for consistency. >> >>> + ti,termination-current = <66000>; /* 66mA */ >>> + ti,precharge-current = <1300000>; /* 1.3A */ >> >> I thought precharge is usually something low, because you are not yet >> sure of battery health...? >> > > I think I put that in incorrectly. The intention was 130mA. > >>> + ti,minimum-sys-voltage = <2750000>; /* 2.75V */ >> >> Are you sure? Normally systems shut down at 3.2V, 3V or so. Li-ion >> batteries don't >> really like to be discharged _this_ deep. > > You are correct. I'll fix it for the next version. > Looking into it further Sanyo and Panasonic get over 300 cycles bringing the NCR18650 down to 2.5V so 2.75V should be fine. http://www.batteryonestop.com/baotongusa/products/datasheets/li-ion/SANYO-NCR18650B-3400mAh.pdf https://industrial.panasonic.com/ww/products/batteries/secondary-batteries/lithium-ion/cylindrical-type/NCR18650PF Angus > Thanks > Angus > >> >> Pavel