All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] sunxi: add custom board
@ 2018-10-24 13:59 Giulio Benetti
  2018-10-24 17:59 ` Maxime Ripard
  0 siblings, 1 reply; 5+ messages in thread
From: Giulio Benetti @ 2018-10-24 13:59 UTC (permalink / raw)
  To: u-boot

Hello Jagan and Maxime,

I've looked around a lot, but I can't find a way to use the board/sunxi:
http://git.denx.de/?p=u-boot.git;a=tree;f=board/sunxi;h=304ee6b4cc8e075759d3bd0beb250b56f6901702;hb=HEAD

to fit what we need.

We have 5 gpios that control the max current setting on current-driver 
for Backlight biasing shunt kathode resistor, and I don't know where to 
place the code to set those pins.

I would like to avoid to create another new board if possible, since 
board/sunxi has everything we need to make our board operative.
In general, is there some sort of __weak__ hooks to be used to extend an 
existing board?
Because I understand that probably you wouldn't add this code I'm 
talking about inside board/sunxi.

This request is done with idea to upstream patch for this board.

Can you help me?

Thanks in advance
Best regards
-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] sunxi: add custom board
  2018-10-24 13:59 [U-Boot] sunxi: add custom board Giulio Benetti
@ 2018-10-24 17:59 ` Maxime Ripard
  2018-10-25 10:57   ` Giulio Benetti
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2018-10-24 17:59 UTC (permalink / raw)
  To: u-boot

On Wed, Oct 24, 2018 at 03:59:56PM +0200, Giulio Benetti wrote:
> Hello Jagan and Maxime,
> 
> I've looked around a lot, but I can't find a way to use the board/sunxi:
> http://git.denx.de/?p=u-boot.git;a=tree;f=board/sunxi;h=304ee6b4cc8e075759d3bd0beb250b56f6901702;hb=HEAD
> 
> to fit what we need.
> 
> We have 5 gpios that control the max current setting on
> current-driver for Backlight biasing shunt kathode resistor, and I
> don't know where to place the code to set those pins.
> 
> I would like to avoid to create another new board if possible, since
> board/sunxi has everything we need to make our board operative.
> In general, is there some sort of __weak__ hooks to be used to extend an
> existing board?
> Because I understand that probably you wouldn't add this code I'm talking
> about inside board/sunxi.
> 
> This request is done with idea to upstream patch for this board.
> 
> Can you help me?

If that's backlight related, maybe you can just create a new backlight
driver?

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] sunxi: add custom board
  2018-10-24 17:59 ` Maxime Ripard
@ 2018-10-25 10:57   ` Giulio Benetti
  2018-10-26 11:06     ` Maxime Ripard
  0 siblings, 1 reply; 5+ messages in thread
From: Giulio Benetti @ 2018-10-25 10:57 UTC (permalink / raw)
  To: u-boot

Hello Maxime,

Il 24/10/2018 19:59, Maxime Ripard ha scritto:
> On Wed, Oct 24, 2018 at 03:59:56PM +0200, Giulio Benetti wrote:
>> Hello Jagan and Maxime,
>>
>> I've looked around a lot, but I can't find a way to use the board/sunxi:
>> http://git.denx.de/?p=u-boot.git;a=tree;f=board/sunxi;h=304ee6b4cc8e075759d3bd0beb250b56f6901702;hb=HEAD
>>
>> to fit what we need.
>>
>> We have 5 gpios that control the max current setting on
>> current-driver for Backlight biasing shunt kathode resistor, and I
>> don't know where to place the code to set those pins.
>>
>> I would like to avoid to create another new board if possible, since
>> board/sunxi has everything we need to make our board operative.
>> In general, is there some sort of __weak__ hooks to be used to extend an
>> existing board?
>> Because I understand that probably you wouldn't add this code I'm talking
>> about inside board/sunxi.
>>
>> This request is done with idea to upstream patch for this board.
>>
>> Can you help me?
> 
> If that's backlight related, maybe you can just create a new backlight
> driver?

If it makes sense for sure we can.

But please can you take a look at the schematics of current-driver with 
mosfets biasing power?
https://pasteboard.co/HK4ChzF.png
As you can see we bias BKL_K (Backlight Kathode) to slightly influence 
the shunt(R81+R76).
I don't know how it could be useful for the others.

We use that to handle different displays with the same board(A20 based).

So does it make sense to write a driver?
And if yes, I would think about adding:
backlight_current.c under u-boot/drivers/video
or another option could be to write a driver under:
u-boot/drivers/power

What do you think?

We only need a road to follow to be upstreamed later.

Thanks a lot
Best regards
-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] sunxi: add custom board
  2018-10-25 10:57   ` Giulio Benetti
@ 2018-10-26 11:06     ` Maxime Ripard
  2018-10-26 13:40       ` Giulio Benetti
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2018-10-26 11:06 UTC (permalink / raw)
  To: u-boot

On Thu, Oct 25, 2018 at 12:57:54PM +0200, Giulio Benetti wrote:
> Hello Maxime,
> 
> Il 24/10/2018 19:59, Maxime Ripard ha scritto:
> > On Wed, Oct 24, 2018 at 03:59:56PM +0200, Giulio Benetti wrote:
> > > Hello Jagan and Maxime,
> > > 
> > > I've looked around a lot, but I can't find a way to use the board/sunxi:
> > > http://git.denx.de/?p=u-boot.git;a=tree;f=board/sunxi;h=304ee6b4cc8e075759d3bd0beb250b56f6901702;hb=HEAD
> > > 
> > > to fit what we need.
> > > 
> > > We have 5 gpios that control the max current setting on
> > > current-driver for Backlight biasing shunt kathode resistor, and I
> > > don't know where to place the code to set those pins.
> > > 
> > > I would like to avoid to create another new board if possible, since
> > > board/sunxi has everything we need to make our board operative.
> > > In general, is there some sort of __weak__ hooks to be used to extend an
> > > existing board?
> > > Because I understand that probably you wouldn't add this code I'm talking
> > > about inside board/sunxi.
> > > 
> > > This request is done with idea to upstream patch for this board.
> > > 
> > > Can you help me?
> > 
> > If that's backlight related, maybe you can just create a new backlight
> > driver?
> 
> If it makes sense for sure we can.
> 
> But please can you take a look at the schematics of current-driver with
> mosfets biasing power?
> https://pasteboard.co/HK4ChzF.png
> As you can see we bias BKL_K (Backlight Kathode) to slightly influence the
> shunt(R81+R76).
> I don't know how it could be useful for the others.
> 
> We use that to handle different displays with the same board(A20 based).
> 
> So does it make sense to write a driver?
> And if yes, I would think about adding:
> backlight_current.c under u-boot/drivers/video
> or another option could be to write a driver under:
> u-boot/drivers/power
> 
> What do you think?

Maybe you can just create a regulator driver, with each current step
describing a step, just like gpio-regulator is doing for the voltage.

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] sunxi: add custom board
  2018-10-26 11:06     ` Maxime Ripard
@ 2018-10-26 13:40       ` Giulio Benetti
  0 siblings, 0 replies; 5+ messages in thread
From: Giulio Benetti @ 2018-10-26 13:40 UTC (permalink / raw)
  To: u-boot

Il 26/10/2018 13:06, Maxime Ripard ha scritto:
> On Thu, Oct 25, 2018 at 12:57:54PM +0200, Giulio Benetti wrote:
>> Hello Maxime,
>>
>> Il 24/10/2018 19:59, Maxime Ripard ha scritto:
>>> On Wed, Oct 24, 2018 at 03:59:56PM +0200, Giulio Benetti wrote:
>>>> Hello Jagan and Maxime,
>>>>
>>>> I've looked around a lot, but I can't find a way to use the board/sunxi:
>>>> http://git.denx.de/?p=u-boot.git;a=tree;f=board/sunxi;h=304ee6b4cc8e075759d3bd0beb250b56f6901702;hb=HEAD
>>>>
>>>> to fit what we need.
>>>>
>>>> We have 5 gpios that control the max current setting on
>>>> current-driver for Backlight biasing shunt kathode resistor, and I
>>>> don't know where to place the code to set those pins.
>>>>
>>>> I would like to avoid to create another new board if possible, since
>>>> board/sunxi has everything we need to make our board operative.
>>>> In general, is there some sort of __weak__ hooks to be used to extend an
>>>> existing board?
>>>> Because I understand that probably you wouldn't add this code I'm talking
>>>> about inside board/sunxi.
>>>>
>>>> This request is done with idea to upstream patch for this board.
>>>>
>>>> Can you help me?
>>>
>>> If that's backlight related, maybe you can just create a new backlight
>>> driver?
>>
>> If it makes sense for sure we can.
>>
>> But please can you take a look at the schematics of current-driver with
>> mosfets biasing power?
>> https://pasteboard.co/HK4ChzF.png
>> As you can see we bias BKL_K (Backlight Kathode) to slightly influence the
>> shunt(R81+R76).
>> I don't know how it could be useful for the others.
>>
>> We use that to handle different displays with the same board(A20 based).
>>
>> So does it make sense to write a driver?
>> And if yes, I would think about adding:
>> backlight_current.c under u-boot/drivers/video
>> or another option could be to write a driver under:
>> u-boot/drivers/power
>>
>> What do you think?
> 
> Maybe you can just create a regulator driver, with each current step
> describing a step, just like gpio-regulator is doing for the voltage.

That's a perfect example, thanks for pointing me.

I would call it gpio-current-regulator and then I would place multiple 
"states" instead of the current 2 states of gpio-regulator.

Does it sound good?

After some work maybe we should submit an RFC, right?

Thank you
Best regards
-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-26 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24 13:59 [U-Boot] sunxi: add custom board Giulio Benetti
2018-10-24 17:59 ` Maxime Ripard
2018-10-25 10:57   ` Giulio Benetti
2018-10-26 11:06     ` Maxime Ripard
2018-10-26 13:40       ` Giulio Benetti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.