ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion
paulk has quit [Ping timeout: 246 seconds]
stikonas has joined #linux-rockchip
Rathann has quit [Quit: Leaving]
paulk has joined #linux-rockchip
camus1 has joined #linux-rockchip
camus has quit [Ping timeout: 255 seconds]
camus1 is now known as camus
Tenkawa has quit [Quit: Was I really ever here?]
kevery has quit [Ping timeout: 268 seconds]
kevery has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 246 seconds]
kevery1 is now known as kevery
lurchi_ has quit [Ping timeout: 252 seconds]
lurchi__ has joined #linux-rockchip
vagrantc has quit [Quit: leaving]
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 255 seconds]
kevery1 is now known as kevery
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 246 seconds]
kevery1 is now known as kevery
ldevulder has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 255 seconds]
kevery1 is now known as kevery
kevery1 has joined #linux-rockchip
kevery has quit [Read error: Connection reset by peer]
kevery1 is now known as kevery
jaganteki has joined #linux-rockchip
kevery has quit [Ping timeout: 268 seconds]
camus1 has joined #linux-rockchip
camus has quit [Read error: Connection reset by peer]
camus1 is now known as camus
paulk has quit [Ping timeout: 246 seconds]
paulk has joined #linux-rockchip
Stat_headcrabed has joined #linux-rockchip
Stat_headcrabed has quit [Quit: Stat_headcrabed]
mx08 has joined #linux-rockchip
jaganteki has quit [Quit: Client closed]
Tenkawa has joined #linux-rockchip
robmur01 has quit [Remote host closed the connection]
robmur01 has joined #linux-rockchip
camus has quit [Remote host closed the connection]
camus has joined #linux-rockchip
dlezcano has joined #linux-rockchip
vulpes2[m] has quit [Ping timeout: 264 seconds]
samueldr has quit [Ping timeout: 260 seconds]
psydroid has quit [Ping timeout: 265 seconds]
arne-b[m] has quit [Ping timeout: 252 seconds]
LinuxHackerman has quit [Ping timeout: 260 seconds]
shoragan[m] has quit [Ping timeout: 265 seconds]
amstan has quit [Ping timeout: 264 seconds]
kilobyte_ch has quit [Ping timeout: 248 seconds]
lurchi__ has quit [Remote host closed the connection]
lurchi__ has joined #linux-rockchip
friedy has joined #linux-rockchip
<friedy> Hi guys, I'm doing some work with the image sensor processor on the RK3399 soc in Linux. I'm trying to access the control registers for the ISP, so I mapped in the registers with ioremap like normal. But for some reason when I try to read from that region of memory readl() doesn't return and the system hangs. I've never had this happen to me
<friedy> before, so I don't know why this is happening.
<friedy> On RK3399 ISP0 is at 0xFF910000. I've mapped this into the kernel's address space, but I still can't read from this region of memory.
<jakllsch> are the clocks running?
<friedy> I believe so. I set the clock rates using CRU_CLKSEL_CON53 and enabled the clocks with CRU_CLKGATE_CON12 registers.
<friedy> Should just be hclk_isp0 and aclk_isp0 correct?
<robmur01> and you've set all the rates and muxes appropriately all the way up the clock tree? This is why we have clock drivers and properly-abstracted driver APIs ;)
<robmur01> same for power domains, which is another thing you'll probably need to cover
kilobyte_ch has joined #linux-rockchip
arne-b[m] has joined #linux-rockchip
<friedy> Do you have an example of this?
<friedy>     isp0: isp0@ff910000 {
<friedy>         compatible = "rockchip,rk3399-cif-isp";
<friedy>         reg = <0x0 0xff910000 0x0 0x4000>;
<friedy>         interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
<friedy>         clocks = <&cru SCLK_ISP0>,
<friedy>              <&cru ACLK_ISP0_WRAPPER>,
<friedy>              <&cru HCLK_ISP0_WRAPPER>;
<friedy>         clock-names = "isp", "aclk", "hclk";
<friedy>         iommus = <&isp0_mmu>;
<friedy>         phys = <&mipi_dphy_rx0>;
<friedy>         phy-names = "dphy";
<friedy>         power-domains = <&power RK3399_PD_ISP0>;
<friedy>         status = "disabled";
<friedy>         ports {
<friedy>             #address-cells = <1>;
<friedy>             #size-cells = <0>;
<friedy>             port@0 {
<friedy>                 reg = <0>;
<CounterPillow> usually you just clk_prepare_enable the right clocks instead of manually writing the registers.
<CounterPillow> also please don't multiline paste in IRC
psydroid has joined #linux-rockchip
<friedy> I tried that in the beginning but I still had the same problem.
<friedy> I parsed the device node and use clk_prepare_enable on the three clocks above.
<robmur01> Er, there's already an upstream driver for that ISP for the last 3 years, so I'm not sure why you'd be starting from scratch anyway :/
<friedy> I need to make some changes to it. It's for a research project.
<CounterPillow> well what you pasted at least seems to be the upstream device tree so that's a good start
<CounterPillow> if it's not clocks then it's power domains
<CounterPillow> (usually, in my experience)
<robmur01> that's fair enough, but my point is that all the basic power management stuff is already there and presumably tested, so don't waste your own time trying to reimplement it, just add whatever you want within the framework of the existing driver and give yourself an easier ride
kilobyte_ch has quit [Ping timeout: 252 seconds]
<friedy> Okay, so if the power is on, the clocks are on, and correct clock rates are set, then I shouldn't have a problem reading from the registers?
<jakllsch> no guarantees :-)
<jakllsch> but that's the minimum
<jakllsch> sometimes there's a clock or reset control in an unusal place
<CounterPillow> I agree with Robin here, just do your experiments as part of the already working driver, ripping out whatever you don't need. It's working and tested code you can rely on
shoragan[m] has joined #linux-rockchip
<robmur01> for reference, rkisp1_probe() reads an ID register pretty early on; nothing looks unusual about the initial setup before that
<CounterPillow> pinctrl_pm_select_default_state(dev); is something I don't see often but I'm fairly inexperienced
<CounterPillow> should only come into play after a suspend/resume cycle though if I understand this correctly
friedy has quit [Quit: Client closed]
friedy has joined #linux-rockchip
kilobyte_ch has joined #linux-rockchip
vulpes2[m] has joined #linux-rockchip
jaganteki has joined #linux-rockchip
amstan has joined #linux-rockchip
friedy has quit [Quit: Client closed]
samueldr has joined #linux-rockchip
LinuxHackerman has joined #linux-rockchip
<robmur01> CounterPillow: yeah, looks like that's probably just to avoid leakage or excess power consumption on the physical camera interface while idle
<robmur01> (although whether that should really be the phy driver's job is another question...)
stikonas has quit [Ping timeout: 255 seconds]
hanetzer has quit [*.net *.split]
digetx has quit [*.net *.split]
Bahhumbug has quit [*.net *.split]
leming has quit [*.net *.split]
pnill has quit [*.net *.split]
Bahhumbug has joined #linux-rockchip
digetx has joined #linux-rockchip
hanetzer has joined #linux-rockchip
pnill has joined #linux-rockchip
leming has joined #linux-rockchip
Bahhumbug has quit [Read error: Connection reset by peer]
Bahhumbug has joined #linux-rockchip
lurchi__ is now known as lurchi_
digetx has quit [Ping timeout: 248 seconds]
lurchi_ is now known as lurchi__
digetx has joined #linux-rockchip
macromorgan has quit [Quit: Leaving]
camus has quit [Remote host closed the connection]
camus has joined #linux-rockchip
jaganteki has quit [Quit: Client closed]
vagrantc has joined #linux-rockchip
jaganteki has joined #linux-rockchip
lurchi__ has quit [Ping timeout: 246 seconds]
lurchi__ has joined #linux-rockchip
macromorgan has joined #linux-rockchip
Rathann has joined #linux-rockchip
obbardc7 has joined #linux-rockchip
sre9 has joined #linux-rockchip
sre9 has quit [Quit: The Lounge - https://thelounge.chat]
obbardc7 has quit [Quit: The Lounge - https://thelounge.chat]
hanetzer has quit [Quit: WeeChat 3.8]
obbardc2 has joined #linux-rockchip
sre9 has joined #linux-rockchip
Rathann has quit [Ping timeout: 252 seconds]
dlezcano has quit [Ping timeout: 265 seconds]
dlezcano has joined #linux-rockchip
Rathann has joined #linux-rockchip