[U-Boot] Supporting SCCB protocol

Hi All,
I would like to know if someone here have implemented a SCCB support in uboot?. I would appreciate if you could give me some snapshot of your codes?.
Regards,
John

Hi John,
I would like to know if someone here have implemented a SCCB support in uboot?. I would appreciate if you could give me some snapshot of your codes?.
It would be good to give some context for people not dealing with the specific topic on a daily basis.
A quick web search for sccb finds "South Carolina Commission for the Blind" - I guess you don't mean that :)
Apart form that, what would you expect from such a support in a boot-loader?
Cheers Detlev

That's correct! I should elaborate it. It should be (Serial Camera Control Bus) protocol developed by omnivision. I am using a OV2715 sensor and I need to access the registers of the said sensor, I have to modify the I2C read/write in uboot to support the SCCB transactions.
Here's my question: If my sensor has power and a clock, does it response to the I2C probe or I have to modify it too?. Right now, If I run iprobe, it did not detect my sensor and not sure what it caused.
Regards,
john
On Mon, Jun 6, 2011 at 4:15 AM, Detlev Zundel dzu@denx.de wrote:
Hi John,
I would like to know if someone here have implemented a SCCB support in uboot?. I would appreciate if you could give me some snapshot of your codes?.
It would be good to give some context for people not dealing with the specific topic on a daily basis.
A quick web search for sccb finds "South Carolina Commission for the Blind" - I guess you don't mean that :)
Apart form that, what would you expect from such a support in a boot-loader?
Cheers Detlev
-- I think that level of generalization is too abstract for useful thinking. -- Richard Stallman in E19N344-0006Q9-Bt@fencepost.gnu.org -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@denx.de

Dear John Tobias,
In message BANLkTimzdPONQ5vQuLUVNQNURF85VtiC5Q@mail.gmail.com you wrote:
That's correct! I should elaborate it. It should be (Serial Camera Control Bus) protocol developed by omnivision. I am using a OV2715 sensor and I need to access the registers of the said sensor, I have to modify the I2C read/write in uboot to support the SCCB transactions.
Which exact operations do you need to perform in U-Boot?
I would expect that initializing a camera controller (which is probably not used in any parts of U-Boot code) should rathe rbe done in the OS device driver.
Best regards,
Wolfgang Denk

Hi Wolfgang Denk,
The actual initialisation of the sensor is in the OS. But, I need an early access to get/set the information in the OTP registers of the sensor.
Regards,
john
On Mon, Jun 6, 2011 at 1:11 PM, Wolfgang Denk wd@denx.de wrote:
Dear John Tobias,
In message BANLkTimzdPONQ5vQuLUVNQNURF85VtiC5Q@mail.gmail.com you wrote:
That's correct! I should elaborate it. It should be (Serial Camera
Control
Bus) protocol developed by omnivision. I am using a OV2715 sensor and I need to access the registers of the said sensor, I have to modify the I2C read/write in uboot to support the SCCB transactions.
Which exact operations do you need to perform in U-Boot?
I would expect that initializing a camera controller (which is probably not used in any parts of U-Boot code) should rathe rbe done in the OS device driver.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Murder is contrary to the laws of man and God. -- M-5 Computer, "The Ultimate Computer", stardate 4731.3

Dear John Tobias,
In message BANLkTin9pfUZ5krZUoxDDbbsJHr4uY3boQ@mail.gmail.com you wrote:
The actual initialisation of the sensor is in the OS. But, I need an early access to get/set the information in the OTP registers of the sensor.
Could you please explain why this cannot be done in the OS driver initialization code as well?
Best regards,
Wolfgang Denk

I am going to use the OTP register to put a unique ID of the board. In order to do that, I don't have to boot the OS if I need to read/write the unique ID of the board.
Regards,
john
On Mon, Jun 6, 2011 at 2:12 PM, Wolfgang Denk wd@denx.de wrote:
Dear John Tobias,
In message BANLkTin9pfUZ5krZUoxDDbbsJHr4uY3boQ@mail.gmail.com you wrote:
The actual initialisation of the sensor is in the OS. But, I need an
early
access to get/set the information in the OTP registers of the sensor.
Could you please explain why this cannot be done in the OS driver initialization code as well?
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Do not underestimate the value of print statements for debugging.

Dear John Tobias,
In message BANLkTinn5oA711EuOELQeNRk2uYQ1N4+nw@mail.gmail.com you wrote:
I am going to use the OTP register to put a unique ID of the board. In order to do that, I don't have to boot the OS if I need to read/write the unique ID of the board.
...
On Mon, Jun 6, 2011 at 2:12 PM, Wolfgang Denk wd@denx.de wrote:
...
Could you please explain why this cannot be done in the OS driver initialization code as well?
Well, this is obviously nowhere needed for U-Boot operation, and you also don't need this in U-Boot to boot your OS.
See bullet # 2 at http://www.denx.de/wiki/view/U-Boot/DesignPrinciples#2_Keep_it_Fast : We don't initialize things in U-Boot, that are not needed here, unless there is a very good reason for it.
In your case, such initialization should be done in the OS device driver. Leave it out of U-Boot.
Best regards,
Wolfgang Denk

Thanks for chatting.
Regards,
john
On Mon, Jun 6, 2011 at 3:26 PM, Wolfgang Denk wd@denx.de wrote:
Dear John Tobias,
In message BANLkTinn5oA711EuOELQeNRk2uYQ1N4+nw@mail.gmail.com you wrote:
I am going to use the OTP register to put a unique ID of the board. In
order
to do that, I don't have to boot the OS if I need to read/write the
unique
ID of the board.
...
On Mon, Jun 6, 2011 at 2:12 PM, Wolfgang Denk wd@denx.de wrote:
...
Could you please explain why this cannot be done in the OS driver initialization code as well?
Well, this is obviously nowhere needed for U-Boot operation, and you also don't need this in U-Boot to boot your OS.
See bullet # 2 at http://www.denx.de/wiki/view/U-Boot/DesignPrinciples#2_Keep_it_Fast : We don't initialize things in U-Boot, that are not needed here, unless there is a very good reason for it.
In your case, such initialization should be done in the OS device driver. Leave it out of U-Boot.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Lots of folks confuse bad management with destiny. -- Frank Hubbard

On Monday, June 06, 2011 16:48:05 John Tobias wrote:
please dont top post in your replies -mike

Hi John,
That's correct! I should elaborate it. It should be (Serial Camera Control Bus) protocol developed by omnivision. I am using a OV2715 sensor and I need to access the registers of the said sensor, I have to modify the I2C read/write in uboot to support the SCCB transactions.
So SCCB is really only another name for I2C or are there differences in the protocol?
If the first holds, then the infrastructure is already thereand you should be able to use the i2c commands. If the latter then you really shoudl come up with your own "sccb" driver. Probably basing it on drivers.i2c/soft_i2c.c would be a good idea.
Here's my question: If my sensor has power and a clock, does it response to the I2C probe or I have to modify it too?. Right now, If I run iprobe, it did not detect my sensor and not sure what it caused.
This should be discoverable by reading the manuals of the sensor. If this is at all like I2C, then it should definitely answer when its clock and data pins are driven by I2C. Did you check with an oscilloscope that you really are talking to the chip?
Cheers Detlev

On Wednesday, June 08, 2011 03:54:01 Detlev Zundel wrote:
That's correct! I should elaborate it. It should be (Serial Camera Control Bus) protocol developed by omnivision. I am using a OV2715 sensor and I need to access the registers of the said sensor, I have to modify the I2C read/write in uboot to support the SCCB transactions.
So SCCB is really only another name for I2C or are there differences in the protocol?
there are slight differences. enough that existing i2c signals arent sufficient, but not enough that tweaking existing i2c framework shouldnt be too much of a hassle to make work. -mike
participants (4)
-
Detlev Zundel
-
John Tobias
-
Mike Frysinger
-
Wolfgang Denk