Comments (21)
How about this?
How about just building your kernel with this dts and checking how it works?
from linux-xtensa.
So how can we find the node to add to the device tree? Are there any ESP-IDF functions we can use to find it?
from linux-xtensa.
So how can we find the node to add to the device tree?
I'm not sure I understand the question. We need to just literally add a node to the esp32s3.dts. It should have the compatible
property that would match a device driver that must be written to control it and the reg
property that would point to the right registers.
from linux-xtensa.
I'm not sure I understand the question. We need to just literally add a node to the esp32s3.dts. It should have the
compatible
property that would match a device driver that must be written to control it and thereg
property that would point to the right registers.
What sort of node are we looking for? Can we use ESP-IDF functions to find the node and its details? Is there a DTS in the ESP-IDF we could look at? Where in the DTS would we put the node?
from linux-xtensa.
Can we use ESP-IDF functions to find the node and its details?
I don't think so.
Is there a DTS in the ESP-IDF we could look at?
No.
What sort of node are we looking for? Where in the DTS would we put the node?
I'd suggest starting with the specification and then looking at other dts files in the linux kernel tree.
from linux-xtensa.
I'd suggest starting with the specification and then looking at other dts files in the linux kernel tree.
Here is what I think is right so far.
cpu_0 {
reg = <0x600C0000 0x30>;
};
I was unsure what to name it. I believe this would go under soc
in the DTS. I still need to find what compatible
should be. Anything else I need to do?
from linux-xtensa.
reg = <0x600C0000 0x30>
That covers some unrelated registers and doesn't cover any IPI registers. Perhaps it should be split into multiple regions.
I was unsure what to name it.
Normally it should be name@base_address
, e.g.: ipi@600c0000
.
I believe this would go under soc in the DTS.
Yes, that sounds right.
I still need to find what compatible should be
It needs to be specific enough to indicate what hardware it is for, but otherwise it's up to you.
Anything else I need to do?
The driver that would service this device and interact with the SMP guts of the xtensa linux kernel.
from linux-xtensa.
That covers some unrelated registers and doesn't cover any IPI registers. Perhaps it should be split into multiple regions.
My bad. I thought it was what I should put for SYSTEM_CPU_INTR_FROM_CPU_0_REG
.
It needs to be specific enough to indicate what hardware it is for, but otherwise it's up to you.
Would something like compatible = "esp,esp32s3-ipi";
work?
from linux-xtensa.
I thought it was what I should put for SYSTEM_CPU_INTR_FROM_CPU_0_REG.
The format of reg
property is <base_address_cells size_cells …>
, with more base/size pairs in the place of … if necessary to represent multiple regions. E.g. to cover the SYSTEM_CPU_INTR_FROM_CPU_0_REG
alone it would be <0x600c0030 4>
Would something like compatible = "esp,esp32s3-ipi"; work?
Yes.
from linux-xtensa.
The format of
reg
property is<base_address_cells size_cells …>
, with more base/size pairs in the place of … if necessary to represent multiple regions. E.g. to cover theSYSTEM_CPU_INTR_FROM_CPU_0_REG
alone it would be<0x600c0030 4>
So would this work?
ipi: ipi@600c0000 {
compatible = "esp,esp32s3-ipi";
cpu_0 {
reg = <0x34 0x38>;
};
cpu_1 {
reg = <0x38 0x3c>;
};
};
from linux-xtensa.
So would this work?
Nope. It has wrong sizes and it implies certain address translation which is not set up here. Please read the DTS spec for the details.
Again, to cover the SYSTEM_CPU_INTR_FROM_CPU_0_REG
alone the reg would be <0x600c0030 4>
.
from linux-xtensa.
Nope. It has wrong sizes and it implies certain address translation which is not set up here. Please read the DTS spec for the details. Again, to cover the
SYSTEM_CPU_INTR_FROM_CPU_0_REG
alone the reg would be<0x600c0030 4>
.
How about this?
ipi: ipi@600c0000 {
compatible = "esp,esp32s3-ipi";
cpu0@30 {
reg = <0x0 0x4>;
};
cpu1@34 {
reg = <0x34 0x4>;
};
};
from linux-xtensa.
How about just building your kernel with this dts and checking how it works?
Do I need to add another cpu
to cpus
first?
from linux-xtensa.
Do I need to add another cpu to cpus first?
It doesn't matter: there's no code that would interpret this information.
from linux-xtensa.
It doesn't matter: there's no code that would interpret this information.
Alright. Will the build fail if my DTS is invalid?
from linux-xtensa.
Will the build fail if my DTS is invalid?
Depends on how invalid. Syntactically invalid dts will break the build, yes. Semantically inconsistent may cause dtc to print warnings. Otherwise you'll see issues at runtime.
from linux-xtensa.
I've been messing with my PC for hours trying to get it to build the base kernel. I'll leave my kernel and rootfs here in case anyone needs it. Now I have to build the kernel with my DTS.
esp32s3linux.zip
from linux-xtensa.
I'm going to delay this for now. I'm waiting on some hardware to arrive. I have an off-topic question though. Would it be possible to wire an SD Card to the board (over either SDIO or SPI), and then give Linux access to it? I just want to know if it's possible. If it is then I'll look into implementing it later.
from linux-xtensa.
Would it be possible to wire an SD Card to the board (over either SDIO or SPI), and then give Linux access to it?
It should be. I don't see why it shouldn't be possible.
from linux-xtensa.
Would it be possible to wire an SD Card to the board (over either SDIO or SPI), and then give Linux access to it?
It should be. I don't see why it shouldn't be possible.
Then it should be perfect for esp32 cam module
from linux-xtensa.
I'm going to close this for now. I think I should start with a less complex part of the chip to implement, like GPIO or SPI. I'll create an issue for questions on how I should implement these once I get to it.
from linux-xtensa.
Related Issues (15)
- Xtensa HiFi 2/4 HOT 1
- USB Serial output instead of UART HOT 19
- GPIO implementation HOT 18
- USB Host Controller HOT 1
- SD/MMC host controller HOT 3
- Page allocation failure HOT 3
- Booting Linux on ESP32-S3 with U-Boot HOT 4
- OpenCL support HOT 3
- ESP32 UART RX support HOT 3
- How to build for ESP32? HOT 35
- ESP32-S3? HOT 286
- Serial Terminal over USB CDC for the ESP32-S3 HOT 1
- SPI Implementation HOT 15
- Xorg on S3 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux-xtensa.